feat: add production Docker setup with multi-stage builds
- Add production Dockerfiles for frontend and backend * Frontend: multi-stage build with nginx serving static files * Backend: multi-stage build with Prisma generation - Create production nginx configuration (nginx/conf.d.prod/) * Routes to frontend-prod:80 and backend-prod:3000 * Supports WebSocket connections for Socket.IO - Update docker-compose.yml to use production config * Add env_file support for backend-prod * Mount production nginx config directory - Add .env.production.example template for deployment
This commit is contained in:
@@ -30,7 +30,7 @@ services:
|
||||
- backend-prod
|
||||
volumes:
|
||||
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
|
||||
- ./nginx/conf.d:/etc/nginx/conf.d:ro
|
||||
- ./nginx/conf.d.prod:/etc/nginx/conf.d:ro
|
||||
- ./ssl:/etc/nginx/ssl:ro
|
||||
ports:
|
||||
- "80:80"
|
||||
@@ -122,6 +122,8 @@ services:
|
||||
args:
|
||||
- NODE_ENV=production
|
||||
container_name: spotlightcam-backend-prod
|
||||
env_file:
|
||||
- ./backend/.env.production
|
||||
expose:
|
||||
- "3000"
|
||||
environment:
|
||||
|
||||
Reference in New Issue
Block a user