0f7282ba87
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.
27 lines
517 B
YAML
27 lines
517 B
YAML
services:
|
|
app:
|
|
image: registry.docker.polytech.djalim.fr/polympr:latest
|
|
ports:
|
|
- "8008:80"
|
|
- "4430:443"
|
|
volumes:
|
|
- /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]
|
|
|
|
|