Add individual docker run commands
This commit is contained in:
48
08-running-containers/docker-compose.yml
Normal file
48
08-running-containers/docker-compose.yml
Normal file
@ -0,0 +1,48 @@
|
||||
services:
|
||||
client-react-vite:
|
||||
build:
|
||||
context: ../05-example-web-application/client-react/
|
||||
dockerfile: ../../06-building-container-images/client-react/Dockerfile.3
|
||||
ports:
|
||||
- 5173:5173
|
||||
volumes:
|
||||
- ${PWD}/client-react/vite.config.js:/usr/src/app/vite.config.js
|
||||
restart: unless-stopped
|
||||
client-react-nginx:
|
||||
build:
|
||||
context: ../05-example-web-application/client-react/
|
||||
dockerfile: ../../06-building-container-images/client-react/Dockerfile.5
|
||||
init: true
|
||||
ports:
|
||||
- 5174:80
|
||||
restart: unless-stopped
|
||||
api-node:
|
||||
build:
|
||||
context: ../05-example-web-application/api-node/
|
||||
dockerfile: ../../06-building-container-images/api-node/Dockerfile.7
|
||||
init: true
|
||||
depends_on:
|
||||
- db
|
||||
environment:
|
||||
- DATABASE_URL=postgres://postgres:foobarbaz@db:5432/postgres
|
||||
ports:
|
||||
- 3000:3000
|
||||
restart: unless-stopped
|
||||
api-golang:
|
||||
build:
|
||||
context: ../05-example-web-application/api-golang/
|
||||
dockerfile: ../../06-building-container-images/api-golang/Dockerfile.6
|
||||
init: true
|
||||
depends_on:
|
||||
- db
|
||||
environment:
|
||||
- DATABASE_URL=postgres://postgres:foobarbaz@db:5432/postgres
|
||||
ports:
|
||||
- 8080:8080
|
||||
restart: unless-stopped
|
||||
db:
|
||||
image: postgres:15.1-alpine
|
||||
environment:
|
||||
- POSTGRES_PASSWORD=foobarbaz
|
||||
ports:
|
||||
- 5432:5432
|
||||
Reference in New Issue
Block a user