From 0f7282ba872005703e82012fc8e25058c4d8a2ae Mon Sep 17 00:00:00 2001 From: Djalim Simaila Date: Fri, 3 Apr 2026 10:50:53 +0200 Subject: [PATCH] chore(compose.yml): update Docker Compose for production deployment Add postgres service with environment variable for password. Change app image to registry and adjust ports. Update volume mount to production path. Add deploy constraints for manager nodes. --- compose.yml | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/compose.yml b/compose.yml index 530640a..570a02f 100644 --- a/compose.yml +++ b/compose.yml @@ -1,10 +1,26 @@ services: app: - container_name: deno_fresh_app - build: . + image: registry.docker.polytech.djalim.fr/polympr:latest ports: - - "80:80" - - "443:443" + - "8008:80" + - "4430:443" volumes: - - .:/app + - /home/kevin/PolyMPR/:/app command: deno run -A main.ts + deploy: + replicas: 1 + placement: + constraints: [node.role == manager] + + db: + image: postgres + restart: always + shm_size: 128mb + environment: + POSTGRES_PASSWORD: ${POSTGRES_PASS} + deploy: + replicas: 1 + placement: + constraints: [node.role == manager] + +