4 ms·
Docker-Compose is likely the simplest solution for your needs (assuming you have some familiarity with Docker). Your docker-compose.yml file would look somethi
by smjburton 2y ago
Docker-Compose is likely the simplest solution for your needs (assuming you have some familiarity with Docker).
Your docker-compose.yml file would look something like this:
```
---
services:
frontend:
image: localhost/frontend:latest
ports:
- 6767:6767
environment:
- ...
volumes:
- /home/user/dev/app/frontend:/app/frontend
restart: unless-stopped
backend-1:
image: localhost/backend-1:latest
ports:
- 7878:7878
environment:
- ...
volumes:
- /home/user/dev/app/backend-1:/app/backend-1
restart: unless-stopped
backend-2:
image: localhost/backend-2:latest
ports:
- 8989:8989
environment:
- ...
volumes:
- /home/user/dev/app/backend-2:/app/backend-2
restart: unless-stopped
```
This example even includes volume mounts to your local files from you app development folder (update to suit your setup) so that any changes are immediately reflected in your running frontend or either backend containers when you save your files.
You would bring all of your services up with this command:
docker-compose up -d
And bring them down again with:
docker-compose down