v1.0 with SW PWA enabled
This commit is contained in:
@ -1,25 +1,46 @@
|
||||
version: "3.9"
|
||||
|
||||
services:
|
||||
migrate:
|
||||
image: migrate/migrate
|
||||
volumes:
|
||||
- ./backend/migrations:/migrations
|
||||
networks:
|
||||
- app-net
|
||||
# On attend que la DB soit prête pour lancer les migrations
|
||||
command: -path=/migrations/ -database "postgres://admin:admin@db:5432/monitoring?sslmode=disable" up
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
backend:
|
||||
build: ./backend
|
||||
container_name: backend
|
||||
ports:
|
||||
- "8080:8080"
|
||||
networks:
|
||||
- app-net
|
||||
depends_on:
|
||||
- db
|
||||
migrate:
|
||||
condition: service_completed_successfully
|
||||
|
||||
frontend:
|
||||
build: ./frontend
|
||||
container_name: frontend
|
||||
ports:
|
||||
- "3000:80"
|
||||
networks:
|
||||
- app-net
|
||||
depends_on:
|
||||
- backend
|
||||
|
||||
node:
|
||||
build: ./node
|
||||
container_name: node
|
||||
environment:
|
||||
- HOST_IP=192.168.1.75
|
||||
ports:
|
||||
- "8081:8081"
|
||||
networks:
|
||||
- app-net
|
||||
volumes:
|
||||
- node-data:/app
|
||||
depends_on:
|
||||
- backend
|
||||
restart: unless-stopped
|
||||
|
||||
db:
|
||||
image: postgres:16-alpine
|
||||
@ -28,13 +49,36 @@ services:
|
||||
POSTGRES_USER: admin
|
||||
POSTGRES_PASSWORD: admin
|
||||
POSTGRES_DB: monitoring
|
||||
ports:
|
||||
- "5432:5432"
|
||||
volumes:
|
||||
- db-data:/var/lib/postgresql/data
|
||||
networks:
|
||||
- app-net
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U admin -d monitoring"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
nginx:
|
||||
image: nginx:alpine
|
||||
container_name: monitor-proxy
|
||||
ports:
|
||||
- "8082:80"
|
||||
- "444:443"
|
||||
volumes:
|
||||
- ./nginx.conf:/etc/nginx/nginx.conf:ro
|
||||
depends_on:
|
||||
- frontend
|
||||
- backend
|
||||
networks:
|
||||
- app-net
|
||||
|
||||
networks:
|
||||
app-net:
|
||||
driver: bridge
|
||||
|
||||
volumes:
|
||||
db-data:
|
||||
db-data:
|
||||
node-data:
|
||||
Reference in New Issue
Block a user