Prepare production and Coolify deployment with original exports and datetime pickers
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
name: manyangles
|
||||
x-runtime: &runtime
|
||||
env_file: ${RUNTIME_ENV_FILE:-.env.production}
|
||||
environment:
|
||||
NODE_ENV: production
|
||||
DATABASE_URL: postgres://manyangles:${POSTGRES_PASSWORD:?Set POSTGRES_PASSWORD}@postgres:5432/manyangles
|
||||
restart: unless-stopped
|
||||
init: true
|
||||
security_opt: ["no-new-privileges:true"]
|
||||
cap_drop: [ALL]
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:17-alpine
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
POSTGRES_DB: manyangles
|
||||
POSTGRES_USER: manyangles
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?Set POSTGRES_PASSWORD}
|
||||
volumes: ["postgres-data:/var/lib/postgresql/data"]
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U manyangles -d manyangles"]
|
||||
interval: 5s
|
||||
timeout: 3s
|
||||
retries: 20
|
||||
migrate:
|
||||
<<: *runtime
|
||||
restart: "no"
|
||||
build: {context: ., target: migrate}
|
||||
depends_on:
|
||||
postgres: {condition: service_healthy}
|
||||
web:
|
||||
<<: *runtime
|
||||
build:
|
||||
context: .
|
||||
target: web
|
||||
args:
|
||||
NEXT_PUBLIC_APP_URL: ${NEXT_PUBLIC_APP_URL:?Set public HTTPS origin}
|
||||
ports: ["127.0.0.1:3000:3000"]
|
||||
depends_on:
|
||||
migrate: {condition: service_completed_successfully}
|
||||
healthcheck:
|
||||
test: ["CMD", "bun", "-e", "fetch('http://127.0.0.1:3000/api/health').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))"]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
start_period: 20s
|
||||
retries: 3
|
||||
worker:
|
||||
<<: *runtime
|
||||
build: {context: ., target: worker}
|
||||
depends_on:
|
||||
migrate: {condition: service_completed_successfully}
|
||||
volumes:
|
||||
postgres-data:
|
||||
Reference in New Issue
Block a user