| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- version: '3.9'
- services:
- postgres:
- image: postgres:16-alpine
- container_name: vidreview-db
- environment:
- POSTGRES_USER: vidreview
- POSTGRES_PASSWORD: vidreview123
- POSTGRES_DB: vidreview
- ports:
- - '5432:5432'
- volumes:
- - postgres_data:/var/lib/postgresql/data
- healthcheck:
- test: ['CMD-SHELL', 'pg_isready -U vidreview']
- interval: 5s
- timeout: 5s
- retries: 5
- api:
- build:
- context: .
- dockerfile: Dockerfile.api
- container_name: vidreview-api
- environment:
- DATABASE_URL: postgresql://vidreview:vidreview123@postgres:5432/vidreview
- JWT_SECRET: ${JWT_SECRET:-change-me-in-production}
- JWT_EXPIRES_IN: ${JWT_EXPIRES_IN:-7d}
- API_PORT: 3001
- NODE_ENV: ${NODE_ENV:-development}
- UPLOAD_DIR: /app/uploads
- MAX_FILE_SIZE_MB: 500
- ports:
- - '3001:3001'
- depends_on:
- postgres:
- condition: service_healthy
- volumes:
- - ./uploads:/app/uploads
- - ./packages/api:/app
- healthcheck:
- test: ['CMD-SHELL', 'wget -qO- http://localhost:3001/health || exit 1']
- interval: 10s
- timeout: 5s
- retries: 5
- next:
- build:
- context: .
- dockerfile: Dockerfile.frontend
- container_name: vidreview-frontend
- environment:
- NEXT_PUBLIC_API_URL: http://localhost:3001
- ports:
- - '3000:3000'
- depends_on:
- api:
- condition: service_healthy
- volumes:
- - ./src:/app
- - ./node_modules_api:/app/node_modules_api
- - ./node_modules_frontend:/app/node_modules
- command: npm run dev
- volumes:
- postgres_data:
|