Files
devops-directive-docker-course/06-building-container-images/docker-compose.yml

49 lines
1.3 KiB
YAML

services:
client-react:
build:
context: ../05-example-web-application/client-react/
dockerfile: ../../06-building-container-images/client-react/Dockerfile
ports:
- 5173:5173
volumes:
- ${PWD}/client-react/vite.config.js:/usr/src/app/vite.config.js
client-react-nginx:
build:
context: ../05-example-web-application/client-react/
dockerfile: ../../06-building-container-images/client-react/Dockerfile.3
init: true
ports:
- 5174:80
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:
- PGUSER=postgres
- PGHOST=db
- PGPASSWORD=foobarbaz
- PGDATABASE=postgres
- PGPORT=5432
ports:
- 3000:3000
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
db:
image: postgres:15.1-alpine
environment:
- POSTGRES_PASSWORD=foobarbaz
ports:
- 5432:5432