Initial Switch to V2. Completely Overhauled Backend, Frontend and General Structure.
This commit is contained in:
@@ -1,38 +1,67 @@
|
||||
services:
|
||||
backend:
|
||||
build: ./backend
|
||||
container_name: bellsystems-backend
|
||||
container_name: bellsystems-backend-v2
|
||||
env_file: .env
|
||||
volumes:
|
||||
- ./backend:/app
|
||||
# Persistent data - lives outside the container
|
||||
- ./data:/app/data
|
||||
- ./data/built_melodies:/app/storage/built_melodies
|
||||
- ./data/firmware:/app/storage/firmware
|
||||
- ./data/flash_assets:/app/storage/flash_assets
|
||||
- ./data/firebase-service-account.json:/app/firebase-service-account.json:ro
|
||||
# Auto-deploy: project root so container can write the trigger file
|
||||
- /home/bellsystems/bellsystems-cp:/home/bellsystems/bellsystems-cp
|
||||
ports:
|
||||
- "8000:8000"
|
||||
depends_on: []
|
||||
- "8002:8000" # different port — v1 backend runs on 8000
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
networks:
|
||||
- internal
|
||||
|
||||
frontend:
|
||||
build: ./frontend
|
||||
container_name: bellsystems-frontend
|
||||
container_name: bellsystems-frontend-v2
|
||||
volumes:
|
||||
- ./frontend:/app
|
||||
- /app/node_modules
|
||||
ports:
|
||||
- "5173:5173"
|
||||
- "5174:5174" # different port — v1 frontend runs on 5173
|
||||
networks:
|
||||
- internal
|
||||
|
||||
nginx:
|
||||
image: nginx:alpine
|
||||
container_name: bellsystems-nginx
|
||||
container_name: bellsystems-nginx-v2
|
||||
ports:
|
||||
- "${NGINX_PORT:-80}:80"
|
||||
- "8001:80" # access v2 on localhost:8001
|
||||
volumes:
|
||||
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
|
||||
depends_on:
|
||||
- backend
|
||||
- frontend
|
||||
networks:
|
||||
- internal
|
||||
|
||||
postgres:
|
||||
image: postgres:16-alpine
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
POSTGRES_DB: ${POSTGRES_DB}
|
||||
POSTGRES_USER: ${POSTGRES_USER}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
networks:
|
||||
- internal
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
|
||||
networks:
|
||||
internal:
|
||||
driver: bridge
|
||||
|
||||
Reference in New Issue
Block a user