2025-11-12 17:50:44 +01:00
|
|
|
services:
|
|
|
|
|
nginx:
|
|
|
|
|
image: nginx:alpine
|
|
|
|
|
container_name: spotlightcam-nginx
|
|
|
|
|
ports:
|
|
|
|
|
- "8080:80"
|
|
|
|
|
volumes:
|
|
|
|
|
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
|
|
|
|
|
- ./nginx/conf.d:/etc/nginx/conf.d:ro
|
|
|
|
|
depends_on:
|
|
|
|
|
- frontend
|
2025-11-12 21:42:52 +01:00
|
|
|
- backend
|
2025-11-12 17:50:44 +01:00
|
|
|
restart: unless-stopped
|
|
|
|
|
|
|
|
|
|
frontend:
|
|
|
|
|
build:
|
|
|
|
|
context: ./frontend
|
|
|
|
|
dockerfile: Dockerfile
|
|
|
|
|
container_name: spotlightcam-frontend
|
|
|
|
|
expose:
|
|
|
|
|
- "5173"
|
|
|
|
|
volumes:
|
|
|
|
|
- ./frontend:/app
|
|
|
|
|
- /app/node_modules
|
|
|
|
|
environment:
|
|
|
|
|
- NODE_ENV=development
|
|
|
|
|
- VITE_HOST=0.0.0.0
|
|
|
|
|
stdin_open: true
|
|
|
|
|
tty: true
|
|
|
|
|
command: npm run dev
|
2025-11-12 21:42:52 +01:00
|
|
|
|
|
|
|
|
backend:
|
|
|
|
|
build:
|
|
|
|
|
context: ./backend
|
|
|
|
|
dockerfile: Dockerfile
|
|
|
|
|
container_name: spotlightcam-backend
|
|
|
|
|
expose:
|
|
|
|
|
- "3000"
|
|
|
|
|
volumes:
|
|
|
|
|
- ./backend:/app
|
|
|
|
|
- /app/node_modules
|
|
|
|
|
environment:
|
|
|
|
|
- NODE_ENV=development
|
|
|
|
|
- PORT=3000
|
|
|
|
|
- CORS_ORIGIN=http://localhost:8080
|
2025-11-12 21:56:11 +01:00
|
|
|
- DATABASE_URL=postgresql://spotlightcam:spotlightcam123@db:5432/spotlightcam
|
|
|
|
|
depends_on:
|
|
|
|
|
- db
|
2025-11-12 21:42:52 +01:00
|
|
|
restart: unless-stopped
|
2025-11-12 21:56:11 +01:00
|
|
|
|
|
|
|
|
db:
|
|
|
|
|
image: postgres:15-alpine
|
|
|
|
|
container_name: spotlightcam-db
|
|
|
|
|
environment:
|
|
|
|
|
- POSTGRES_USER=spotlightcam
|
|
|
|
|
- POSTGRES_PASSWORD=spotlightcam123
|
|
|
|
|
- POSTGRES_DB=spotlightcam
|
|
|
|
|
volumes:
|
|
|
|
|
- postgres_data:/var/lib/postgresql/data
|
|
|
|
|
ports:
|
|
|
|
|
- "5432:5432"
|
|
|
|
|
restart: unless-stopped
|
|
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
|
postgres_data:
|