feat: fix alot of issues
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
# Coolify deployment (Docker Compose build pack).
|
||||
# Postgres runs as a separate Coolify database resource so it gets scheduled backups;
|
||||
# set DATABASE_URL to its internal connection URL. Domains are assigned in the Coolify UI:
|
||||
# api -> https://api.example.com:3001
|
||||
# dashboard -> https://dashboard.example.com:3000
|
||||
services:
|
||||
api:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
target: api
|
||||
environment:
|
||||
DATABASE_URL: ${DATABASE_URL}
|
||||
JWT_SECRET: ${SERVICE_BASE64_64_JWT}
|
||||
PORT: 3001
|
||||
CORS_ORIGIN: ${DASHBOARD_URL}
|
||||
RESEND_API_KEY: ${RESEND_API_KEY:-}
|
||||
RESEND_FROM_EMAIL: ${RESEND_FROM_EMAIL:-KoolTap <onboarding@resend.dev>}
|
||||
# Coolify's proxy is one hop; use 2 if Cloudflare proxying is also enabled
|
||||
TRUST_PROXY: ${TRUST_PROXY:-1}
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "-qO-", "http://127.0.0.1:3001/api/v1/health"]
|
||||
interval: 15s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
# Migrations run before the server starts
|
||||
start_period: 60s
|
||||
restart: unless-stopped
|
||||
|
||||
dashboard:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
target: dashboard
|
||||
args:
|
||||
NEXT_PUBLIC_API_URL: ${API_URL}/api/v1
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "-qO-", "http://127.0.0.1:3000/"]
|
||||
interval: 15s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
start_period: 30s
|
||||
depends_on:
|
||||
api:
|
||||
condition: service_healthy
|
||||
restart: unless-stopped
|
||||
Reference in New Issue
Block a user