54 lines
1.5 KiB
YAML
54 lines
1.5 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
# PostgreSQL Database
|
|
db:
|
|
image: postgres:16-alpine
|
|
container_name: prompts-chat-db
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: postgres
|
|
POSTGRES_DB: prompts_chat
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
ports:
|
|
- "5432:5432"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
# Next.js Application
|
|
app:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
container_name: prompts-chat-app
|
|
restart: unless-stopped
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
environment:
|
|
DATABASE_URL: postgresql://postgres:postgres@db:5432/prompts_chat?schema=public
|
|
NEXTAUTH_URL: http://localhost:3000
|
|
NEXTAUTH_SECRET: ${NEXTAUTH_SECRET:-change-me-in-production-use-openssl-rand-base64-32}
|
|
# Optional: OAuth providers
|
|
# GOOGLE_CLIENT_ID: ${GOOGLE_CLIENT_ID}
|
|
# GOOGLE_CLIENT_SECRET: ${GOOGLE_CLIENT_SECRET}
|
|
# AZURE_AD_CLIENT_ID: ${AZURE_AD_CLIENT_ID}
|
|
# AZURE_AD_CLIENT_SECRET: ${AZURE_AD_CLIENT_SECRET}
|
|
# AZURE_AD_TENANT_ID: ${AZURE_AD_TENANT_ID}
|
|
# Optional: S3 storage
|
|
# S3_BUCKET: ${S3_BUCKET}
|
|
# S3_REGION: ${S3_REGION}
|
|
# S3_ACCESS_KEY_ID: ${S3_ACCESS_KEY_ID}
|
|
# S3_SECRET_ACCESS_KEY: ${S3_SECRET_ACCESS_KEY}
|
|
# S3_ENDPOINT: ${S3_ENDPOINT}
|
|
ports:
|
|
- "3000:3000"
|
|
|
|
volumes:
|
|
postgres_data:
|