Files
ProjectE/docker-compose.yml
T

78 lines
2.0 KiB
YAML
Raw Normal View History

services:
web:
build:
context: .
dockerfile: Dockerfile.web
container_name: project-e-web
# For Nginx Proxy Manager: Don't expose ports directly
# NPM will connect via Docker network using container name
# Only uncomment ports if you need direct access for debugging
ports:
- "3000:3000"
environment:
- NODE_ENV=production
- POCKETBASE_URL=http://db:8090
- POCKETBASE_ADMIN_TOKEN=${POCKETBASE_ADMIN_TOKEN:-}
- PUBLIC_URL=${PUBLIC_URL:-http://localhost:3000}
- COOKIE_SECURE=${COOKIE_SECURE:-false}
- ALLOWED_HOSTS=${ALLOWED_HOSTS:-localhost}
volumes:
- project-e-web-uploads:/tmp/uploads
networks:
- project-e-network
depends_on:
db:
condition: service_healthy
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3000/api/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
restart: unless-stopped
db:
build:
context: .
dockerfile: Dockerfile.pocketbase
container_name: project-e-db
# For Nginx Proxy Manager: Don't expose ports directly
# Only uncomment if you need direct PocketBase admin access
ports:
- "8090:8090"
volumes:
- project-e-pb-data:/pb_data
networks:
- project-e-network
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8090/api/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
restart: unless-stopped
worker:
build:
context: .
dockerfile: Dockerfile.worker
container_name: project-e-worker
environment:
- NODE_ENV=production
- POCKETBASE_URL=http://db:8090
- POCKETBASE_ADMIN_TOKEN=${POCKETBASE_ADMIN_TOKEN:-}
networks:
- project-e-network
depends_on:
db:
condition: service_healthy
restart: unless-stopped
networks:
project-e-network:
driver: bridge
volumes:
project-e-pb-data:
project-e-web-uploads: