Repository navigation
Expand file tree
/
Copy pathdocker-compose.app.yml
More file actions
78 lines (75 loc) · 2.81 KB
/
Copy pathdocker-compose.app.yml
File metadata and controls
78 lines (75 loc) · 2.81 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# Fox Schema — self-host the web app (single image, all dialects including Db2).
# Separate from the root docker-compose.yml, which spins up the test databases.
#
# Pull-and-run (no .env needed — entrypoint auto-creates APP_ENCRYPTION_KEY on /data):
# docker compose -f docker-compose.app.yml up -d
#
# Or build locally (linux/amd64 — ibm_db has no arm64 build):
# docker compose -f docker-compose.app.yml up -d --build
#
# Optional: set APP_ENCRYPTION_KEY in .env to pin the key yourself.
# Open http://localhost:${PORT} (default 3210). See docs/DEPLOYMENT.md.
#
# Workflow engine (opt-in — it needs its own token and encryption key, and a
# local image that contains apps/workflow-server):
# WORKFLOW_ENGINE_ENDPOINT=http://workflow:8081 \
# WORKFLOW_ENGINE_TOKEN=… FOXFLOW_ENCRYPTION_KEY=… \
# docker compose -f docker-compose.app.yml --profile workflow up -d --build
services:
fox:
build:
context: .
dockerfile: Dockerfile
args:
WITH_DB2: 'true'
platform: linux/amd64
# Prefer the published Hub image; `up --build` still builds locally.
image: ${FOX_IMAGE:-5nickels/foxschema:latest}
# Publish host ${PORT} -> the container's ${API_PORT}. Set PORT in .env to
# avoid clashing with your other services.
ports:
- '${PORT:-3210}:${API_PORT:-3210}'
environment:
API_PORT: ${API_PORT:-3210}
# Optional — when unset, docker-entrypoint.sh generates and persists a key
# at /data/.app_encryption_key on first boot.
APP_ENCRYPTION_KEY: ${APP_ENCRYPTION_KEY:-}
APP_DB_ENGINE: ${APP_DB_ENGINE:-sqlite}
APP_DB_PATH: ${APP_DB_PATH:-/data/foxschema.db}
APP_DB_URL: ${APP_DB_URL:-}
APP_KEY_SCHEME: ${APP_KEY_SCHEME:-v1}
LOCAL_SINGLE_USER: ${LOCAL_SINGLE_USER:-true}
NODE_ENV: production
# Unsaved engine default. A value saved in Workflow settings still wins.
WORKFLOW_ENGINE_ENDPOINT: ${WORKFLOW_ENGINE_ENDPOINT:-}
WORKFLOW_ENGINE_TOKEN: ${WORKFLOW_ENGINE_TOKEN:-}
volumes:
- fox_data:/data
restart: unless-stopped
workflow:
profiles: ['workflow']
build:
context: .
dockerfile: Dockerfile
args:
WITH_DB2: 'true'
image: ${FOX_IMAGE:-5nickels/foxschema:latest}
platform: linux/amd64
command: ['node_modules/.bin/tsx', 'apps/workflow-server/src/server.ts']
environment:
HOST: 0.0.0.0
PORT: 8081
WORKFLOW_ENGINE_TOKEN: ${WORKFLOW_ENGINE_TOKEN:-}
FOXFLOW_ENCRYPTION_KEY: ${FOXFLOW_ENCRYPTION_KEY:-}
FOXSCHEMA_URL: http://fox:${API_PORT:-3210}
FOXFLOW_DB_PATH: /data/workflow-engine.sqlite
FOXFLOW_FILES_DIR: /data/workflow-files
WORKFLOW_LOG_DIR: /data/workflow-logs
volumes:
- workflow_data:/data
depends_on:
- fox
restart: unless-stopped
volumes:
fox_data:
workflow_data: