-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathdocker-compose.jobs.yml
More file actions
150 lines (140 loc) · 5.31 KB
/
docker-compose.jobs.yml
File metadata and controls
150 lines (140 loc) · 5.31 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
services:
# Constructive Admin GraphQL API server (internal, header-based routing)
constructive-admin-server:
container_name: constructive-admin-server
image: constructive:dev
build:
context: .
dockerfile: ./Dockerfile
entrypoint: ["constructive", "server", "--host", "0.0.0.0", "--port", "3000", "--origin", "*"]
environment:
NODE_ENV: development
# Server
PORT: "3000"
SERVER_HOST: "0.0.0.0"
SERVER_TRUST_PROXY: "true"
SERVER_ORIGIN: "*"
SERVER_STRICT_AUTH: "false"
# Postgres connection (matches postgres service)
PGHOST: postgres
PGPORT: "5432"
PGUSER: postgres
PGPASSWORD: password
PGDATABASE: constructive
# Api configuration
API_ENABLE_SERVICES: "true"
API_EXPOSED_SCHEMAS: "metaschema_public,services_public,constructive_auth_public"
# API_IS_PUBLIC=false enables header-based routing (X-Api-Name, X-Database-Id, X-Meta-Schema)
API_IS_PUBLIC: "false"
# Meta schemas used for schema validation and X-Meta-Schema routing
API_META_SCHEMAS: "metaschema_public,services_public,metaschema_modules_public,constructive_auth_public"
API_ANON_ROLE: "administrator"
API_ROLE_NAME: "administrator"
ports:
- "3002:3000"
networks:
constructive-net:
aliases:
- constructive-admin-server
# Constructive Public GraphQL API server (external, domain-based routing)
constructive-server:
container_name: constructive-server
image: constructive:dev
entrypoint: ["constructive", "server", "--host", "0.0.0.0", "--port", "3000", "--origin", "*"]
environment:
NODE_ENV: development
# Server
PORT: "3000"
SERVER_HOST: "0.0.0.0"
SERVER_TRUST_PROXY: "true"
SERVER_ORIGIN: "*"
SERVER_STRICT_AUTH: "false"
# Postgres connection (matches postgres service)
PGHOST: postgres
PGPORT: "5432"
PGUSER: postgres
PGPASSWORD: password
PGDATABASE: constructive
# Api configuration
API_ENABLE_SERVICES: "false"
API_EXPOSED_SCHEMAS: "metaschema_public,services_public,constructive_auth_public"
# Public-facing server
API_IS_PUBLIC: "true"
# Meta schemas used for schema validation
API_META_SCHEMAS: "metaschema_public,services_public,metaschema_modules_public,constructive_auth_public"
API_ANON_ROLE: "anonymous"
API_ROLE_NAME: "authenticated"
ports:
- "3000:3000"
networks:
constructive-net:
aliases:
- constructive-server
# Send email link function (invite, password reset, verification)
send-email-link:
container_name: send-email-link
image: constructive:dev
entrypoint: ["node", "functions/send-email-link/dist/index.js"]
environment:
NODE_ENV: development
LOG_LEVEL: info
DEFAULT_DATABASE_ID: "dbe"
# Point to admin server (uses X-Api-Name header routing when API_IS_PUBLIC=false)
GRAPHQL_URL: "http://constructive-admin-server:3000/graphql"
META_GRAPHQL_URL: "http://constructive-admin-server:3000/graphql"
# API name for header-based routing (X-Api-Name header) - kept for future use
GRAPHQL_API_NAME: "private"
# Optional: provide an existing API token (Bearer) if your server requires it.
GRAPHQL_AUTH_TOKEN: "${GRAPHQL_AUTH_TOKEN:-}"
# Mailgun / email provider configuration for the Postmaster package
MAILGUN_API_KEY: "${MAILGUN_API_KEY:-change-me-mailgun-api-key}"
MAILGUN_KEY: "${MAILGUN_KEY:-change-me-mailgun-api-key}"
MAILGUN_DOMAIN: "mg.constructive.io"
MAILGUN_FROM: "no-reply@mg.constructive.io"
MAILGUN_REPLY: "info@mg.constructive.io"
# Local dashboard port for generated links, used only for
# localhost-style hosts in DRY RUN mode:
# http://localhost:LOCAL_APP_PORT/...
LOCAL_APP_PORT: "3000"
SEND_EMAIL_LINK_DRY_RUN: "${SEND_EMAIL_LINK_DRY_RUN:-true}"
ports:
- "8082:8080"
networks:
- constructive-net
# Jobs runtime: callback server + worker + scheduler
knative-job-service:
container_name: knative-job-service
image: constructive:dev
entrypoint: ["node", "jobs/knative-job-service/dist/run.js"]
depends_on:
- send-email-link
environment:
NODE_ENV: development
# Postgres (jobs extension lives in this DB)
PGUSER: postgres
PGHOST: postgres
PGPASSWORD: password
PGPORT: "5432"
PGDATABASE: constructive
JOBS_SCHEMA: app_jobs
# Worker configuration
JOBS_SUPPORT_ANY: "false"
JOBS_SUPPORTED: "send-email-link"
HOSTNAME: "knative-job-service-1"
# Callback HTTP server (job completion callbacks)
INTERNAL_JOBS_CALLBACK_PORT: "8080"
INTERNAL_JOBS_CALLBACK_URL: "http://knative-job-service:8080/callback"
# Hostname used by job-utils.getCallbackBaseUrl for callbacks
JOBS_CALLBACK_HOST: "knative-job-service"
# Function gateway base URL (used by worker when no dev map is present)
INTERNAL_GATEWAY_URL: "http://send-email-link:8080"
# Development-only map from task identifier -> function URL
INTERNAL_GATEWAY_DEVELOPMENT_MAP: '{"send-email-link":"http://send-email-link:8080"}'
ports:
- "8080:8080"
networks:
- constructive-net
networks:
constructive-net:
external: true
name: constructive-net