-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
40 lines (39 loc) · 1.49 KB
/
Copy pathdocker-compose.yml
File metadata and controls
40 lines (39 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
services:
postgres:
image: postgres:17
container_name: "cpab-postgres"
restart: unless-stopped
environment:
POSTGRES_USER: ${POSTGRES_USER:-cpab}
# Required: set a strong database password in your shell or .env file before startup.
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB:-cpab}
volumes:
- ./data/postgres:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-cpab} -d ${POSTGRES_DB:-cpab}"]
interval: 5s
timeout: 5s
retries: 5
cpab:
build:
context: .
dockerfile: Dockerfile
container_name: "cpab"
restart: unless-stopped
environment:
# Required: set POSTGRES_PASSWORD before startup.
# This local compose file keeps sslmode=disable for a non-TLS Postgres container; change it to require for TLS-enabled deployments.
DB_CONNECTION: "postgres://${POSTGRES_USER:-cpab}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB:-cpab}?sslmode=disable"
# Optional comma-separated browser origins for admin/front API CORS, e.g. https://admin.example.com,https://portal.example.com
CORS_ORIGINS: ${CORS_ORIGINS:-}
# Required: set JWT_SECRET to a strong random value. Generate one with: openssl rand -hex 32
JWT_SECRET: ${JWT_SECRET}
JWT_EXPIRY: ${JWT_EXPIRY:-720h}
depends_on:
postgres:
condition: service_healthy
ports:
- "8318:8318"
working_dir: /CLIProxyAPIBusiness
command: ./cpab