73 lines
1.5 KiB
YAML
73 lines
1.5 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
app:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
target: production
|
|
args:
|
|
VITE_BACKEND_URL: ${VITE_BACKEND_URL}
|
|
env_file: .env
|
|
ports:
|
|
- "5173:80" # Frontend exposed on port 5173
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://app:80/"] # Changed to port 80
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
db:
|
|
image: postgres:13
|
|
environment:
|
|
POSTGRES_DB: ${DB_NAME}
|
|
POSTGRES_USER: ${DB_USER}
|
|
POSTGRES_PASSWORD: ${DB_PASSWORD}
|
|
ports:
|
|
- "5432:5432"
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
minio:
|
|
image: minio/minio
|
|
environment:
|
|
MINIO_ROOT_USER: ${MINIO_ACCESS_KEY}
|
|
MINIO_ROOT_PASSWORD: ${MINIO_SECRET_KEY}
|
|
command: server /data
|
|
ports:
|
|
- "9000:9000"
|
|
volumes:
|
|
- minio_data:/data
|
|
|
|
redis:
|
|
image: redis:6
|
|
environment:
|
|
- REDIS_HOST=redis
|
|
- REDIS_PORT=6379
|
|
ports:
|
|
- "6379:6379"
|
|
volumes:
|
|
- redis_data:/data
|
|
|
|
nginx:
|
|
image: nginx:latest
|
|
volumes:
|
|
- ./nginx.conf:/etc/nginx/nginx.conf # Your Nginx config
|
|
ports:
|
|
- "80:80" # Host port 80 mapped to Nginx port 80
|
|
depends_on:
|
|
- app
|
|
|
|
volumes:
|
|
postgres_data:
|
|
minio_data:
|
|
redis_data:
|