Files
awesome-chatgpt-prompts-pro…/docker-compose.yml

47 lines
1.1 KiB
YAML

# Docker Compose for prompts.chat
# Alternative to the all-in-one image - separates app and database
#
# Usage:
# docker compose up -d
# docker compose down
services:
app:
build:
context: .
dockerfile: docker/Dockerfile.app
ports:
- "80:3000"
environment:
- NODE_ENV=production
- DATABASE_URL=postgresql://prompts:prompts@db:5432/prompts?schema=public
- AUTH_SECRET=${AUTH_SECRET:-change-me-in-production}
depends_on:
db:
condition: service_healthy
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/api/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
db:
image: postgres:16-alpine
environment:
- POSTGRES_USER=prompts
- POSTGRES_PASSWORD=prompts
- POSTGRES_DB=prompts
volumes:
- postgres_data:/var/lib/postgresql/data
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U prompts -d prompts"]
interval: 10s
timeout: 5s
retries: 5
volumes:
postgres_data: