67 lines
2.1 KiB
YAML
67 lines
2.1 KiB
YAML
services:
|
|
kua-cashier-postgres:
|
|
image: postgres:16-alpine
|
|
container_name: kua-cashier-postgres
|
|
restart: unless-stopped
|
|
environment:
|
|
- POSTGRES_USER=kua_cashier
|
|
- POSTGRES_PASSWORD=${KUA_CASHIER_DB_PASSWORD:?KUA_CASHIER_DB_PASSWORD required}
|
|
- POSTGRES_DB=kua_cashier
|
|
volumes:
|
|
- kua-cashier-postgres-data:/var/lib/postgresql/data
|
|
networks:
|
|
- kua-services
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U kua_cashier -d kua_cashier"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
kua-cashier:
|
|
build: .
|
|
container_name: kua-cashier
|
|
restart: unless-stopped
|
|
environment:
|
|
- NODE_ENV=production
|
|
- PORT=4200
|
|
- KUA_CASHIER_DB_URL=postgresql://kua_cashier:${KUA_CASHIER_DB_PASSWORD}@kua-cashier-postgres:5432/kua_cashier
|
|
- KUA_CASHIER_ADMIN_TOKEN=${KUA_CASHIER_ADMIN_TOKEN:?KUA_CASHIER_ADMIN_TOKEN required}
|
|
- KUA_CASHIER_PUBLIC_URL=${KUA_CASHIER_PUBLIC_URL:-https://cashier.kua.cl}
|
|
- KUA_ALLOWED_NODES=${KUA_ALLOWED_NODES:-gal,bruno,genesis}
|
|
- BCI_SANDBOX=${BCI_SANDBOX:-1}
|
|
- BCI_SUBSCRIPTION_KEY=${BCI_SUBSCRIPTION_KEY:-}
|
|
- BCI_WEBHOOK_SECRET=${BCI_WEBHOOK_SECRET:-}
|
|
- BCI_ORGANIZATION_NAME=${BCI_ORGANIZATION_NAME:-}
|
|
- BCI_ACCOUNT_NUMBER=${BCI_ACCOUNT_NUMBER:-}
|
|
- BCI_ACCOUNT_RUT=${BCI_ACCOUNT_RUT:-}
|
|
- BCI_ACCOUNT_CHECK_DIGIT=${BCI_ACCOUNT_CHECK_DIGIT:-}
|
|
ports:
|
|
- "100.74.17.6:4200:4200"
|
|
volumes:
|
|
- /var/run/tailscale/tailscaled.sock:/var/run/tailscale/tailscaled.sock:ro
|
|
networks:
|
|
- kua-services
|
|
- production_proxy
|
|
depends_on:
|
|
kua-cashier-postgres:
|
|
condition: service_healthy
|
|
labels:
|
|
- "caddy=cashier.kua.cl"
|
|
- "caddy.handle=/bci/*"
|
|
- "caddy.handle.reverse_proxy={{upstreams 4200}}"
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-sf", "http://localhost:4200/health"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 10s
|
|
|
|
networks:
|
|
production_proxy:
|
|
external: true
|
|
kua-services:
|
|
external: true
|
|
|
|
volumes:
|
|
kua-cashier-postgres-data:
|