Browse Source

backend: Add production docker-compose config

ble^2
Andreas Berthoud 4 years ago
parent
commit
6c30a53376
  1. 38
      backend/docker-compose-prod.yml

38
backend/docker-compose-prod.yml

@ -0,0 +1,38 @@
version: "3"
services:
monsun_postgres:
image: postgres
container_name: monsun_postgres
restart: always
logging:
driver: json-file
options:
max-size: "200k"
max-file: "10"
volumes:
- ./db-data:/var/lib/postgresql/data
env_file: prod.env
monsun_backend:
image: registry.berthoud.dev/monsun_backend
container_name: monsun_backend
restart: always
logging:
driver: json-file
options:
max-size: "200k"
max-file: "10"
ports:
- 30010:80
volumes:
- ./config:/var/config/
depends_on:
- monsun_postgres
environment:
POSTGRES_HOST: monsun_postgres
env_file: prod.env
devices:
- "/dev/ttyACM0:/dev/tty.client"
command: ["bash", "./wait-for-it.sh", "monsun_postgres:5432", "-t", "60", "--", "./docker-entrypoint.sh"]
Loading…
Cancel
Save