Use simplified docker-compose.yml for Dokploy
This commit is contained in:
@@ -1,58 +1,18 @@
|
|||||||
version: '3.8'
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
# PostgreSQL Database
|
|
||||||
db:
|
|
||||||
image: postgres:16-alpine
|
|
||||||
container_name: todo-db
|
|
||||||
restart: unless-stopped
|
|
||||||
environment:
|
|
||||||
POSTGRES_USER: ${DB_USER:-todo}
|
|
||||||
POSTGRES_PASSWORD: ${DB_PASSWORD:?DB_PASSWORD required}
|
|
||||||
POSTGRES_DB: ${DB_NAME:-todo_app}
|
|
||||||
volumes:
|
|
||||||
- postgres_data:/var/lib/postgresql/data
|
|
||||||
ports:
|
|
||||||
- "5433:5432" # Using 5433 to avoid conflicts
|
|
||||||
healthcheck:
|
|
||||||
test: ["CMD-SHELL", "pg_isready -U ${DB_USER:-todo}"]
|
|
||||||
interval: 5s
|
|
||||||
timeout: 5s
|
|
||||||
retries: 5
|
|
||||||
|
|
||||||
# API Server
|
|
||||||
api:
|
api:
|
||||||
build:
|
build:
|
||||||
context: ./apps/api
|
context: ./apps/api
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
container_name: todo-api
|
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
- 3001
|
||||||
environment:
|
environment:
|
||||||
DATABASE_URL: postgresql://${DB_USER:-todo}:${DB_PASSWORD}@db:5432/${DB_NAME:-todo_app}
|
- DATABASE_URL=${DATABASE_URL}
|
||||||
PORT: 3001
|
- PORT=3001
|
||||||
NODE_ENV: production
|
- NODE_ENV=production
|
||||||
APP_URL: ${APP_URL:-https://todo.donovankelly.xyz}
|
- APP_URL=${APP_URL}
|
||||||
ALLOWED_ORIGINS: ${ALLOWED_ORIGINS:-https://todo.donovankelly.xyz}
|
- ALLOWED_ORIGINS=${ALLOWED_ORIGINS}
|
||||||
RESEND_API_KEY: ${RESEND_API_KEY}
|
- BETTER_AUTH_SECRET=${BETTER_AUTH_SECRET}
|
||||||
FROM_EMAIL: ${FROM_EMAIL:-noreply@donovankelly.xyz}
|
- RESEND_API_KEY=${RESEND_API_KEY}
|
||||||
HAMMER_API_KEY: ${HAMMER_API_KEY}
|
- FROM_EMAIL=${FROM_EMAIL}
|
||||||
ports:
|
- HAMMER_API_KEY=${HAMMER_API_KEY}
|
||||||
- "3001:3001"
|
|
||||||
depends_on:
|
|
||||||
db:
|
|
||||||
condition: service_healthy
|
|
||||||
|
|
||||||
# Web Frontend (built and served by nginx)
|
|
||||||
web:
|
|
||||||
build:
|
|
||||||
context: ./apps/web
|
|
||||||
dockerfile: Dockerfile
|
|
||||||
container_name: todo-web
|
|
||||||
restart: unless-stopped
|
|
||||||
ports:
|
|
||||||
- "3002:80"
|
|
||||||
depends_on:
|
|
||||||
- api
|
|
||||||
|
|
||||||
volumes:
|
|
||||||
postgres_data:
|
|
||||||
|
|||||||
Reference in New Issue
Block a user