diff --git a/backend/docker-compose-prod.yml b/backend/docker-compose-prod.yml new file mode 100644 index 0000000..d13d040 --- /dev/null +++ b/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"]