33651/docker/docker-compose.yml

55 lines
1.1 KiB
YAML

version: "3.9"
services:
web:
image: frontend
build: ../frontend
stdin_open: true
tty: true
ports:
- "3000:3000"
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
db:
image: postgres
volumes:
- ./data/db:/var/lib/postgresql/data
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
- POSTGRES_DB=db_vres
ports:
- "5432:5432"
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
backend:
build: ../backend
volumes:
- ./wait-for-it.sh:/usr/src/app/wait-for-it.sh
- ./start-backend.sh:/usr/src/app/start-backend.sh
env_file:
- ../backend/.env
environment:
- DB_HOST=db
- DB_PORT=5432
- DB_NAME=postgres
- DB_USER=postgres
- DB_PASSWORD=postgres
ports:
- "8080:8080"
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
depends_on:
- db
command: ["bash", "./wait-for-it.sh", "db:5432", "--timeout=0", "--strict", "--", "bash", "./start-backend.sh"]