Files
main/compose.yaml
ksv741 7e382d460b
Conventional commits / commits (pull_request) Successful in 10s
feat: add containerized application delivery #11
2026-09-16 09:42:13 +03:00

52 lines
1.3 KiB
YAML

name: wealthledger
x-backend: &backend
image: ${BACKEND_IMAGE:?Set versioned backend image}
environment:
NODE_ENV: production
PORT: '3000'
DATABASE_URL: file:/data/wealthledger.db
FRONTEND_ORIGIN: ${FRONTEND_ORIGIN:?Set browser-visible origin}
JWT_SECRET: ${JWT_SECRET:?Set persistent JWT secret}
TOKEN_ENCRYPTION_KEY: ${TOKEN_ENCRYPTION_KEY:?Set persistent encryption key}
LOG_LEVEL: ${LOG_LEVEL:-info}
volumes:
- type: bind
source: ${DATA_DIRECTORY:?Set persistent absolute host data directory}
target: /data
bind:
create_host_path: false
read_only: true
init: true
security_opt: [no-new-privileges:true]
cap_drop: [ALL]
services:
migration:
<<: *backend
command: [node, node_modules/prisma/build/index.js, migrate, deploy]
restart: 'no'
healthcheck:
disable: true
backend:
<<: *backend
scale: 1
restart: unless-stopped
depends_on:
migration:
condition: service_completed_successfully
frontend:
image: ${FRONTEND_IMAGE:?Set versioned frontend image}
ports:
- '127.0.0.1:${FRONTEND_PORT:-8080}:8080'
read_only: true
tmpfs: [/tmp]
security_opt: [no-new-privileges:true]
cap_drop: [ALL]
restart: unless-stopped
depends_on:
backend:
condition: service_healthy