Files
spotlightcam/docker-compose.yml

66 lines
1.4 KiB
YAML
Raw Normal View History

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
- backend
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
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
- DATABASE_URL=postgresql://spotlightcam:spotlightcam123@db:5432/spotlightcam
depends_on:
- db
restart: unless-stopped
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: