'How To Set Up ReactJS, Laravel (API), Nginx, MariaDB and phpMyAdmin With Docker Compose on Ubuntu 20.04 (DigitalOcean)

I am wanting to deploy my project including ReactJS, Laravel (API), Nginx, MariaDB and phpMyAdmin to VPS using Docker Compose, specifically DigitalOcean. The server at DO uses Ubuntu 20.04. I tried looking for an example for my project type but none of them worked for my project. I also tried writing but it doesn't work.



Solution 1:[1]

Since you are using Docker compose I wouldn't try to create everything at once. Try making the pieces separately and you will see what problem is happening

Here is a tutorial for laravel and mariaDB steps in docker compose https://geshan.com.np/blog/2015/10/getting-started-with-laravel-mariadb-mysql-docker/ they are using alpine linux but you can switch to a ubuntu base image instead

And then you can make a frontend react container https://github.com/hinchley2018/react-docker that depends on the api in docker compose

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Jonathon H.