Repository navigation
Expand file tree
/
Copy pathcompose.https-candidate-2k2.yaml
More file actions
109 lines (103 loc) · 3.43 KB
/
Copy pathcompose.https-candidate-2k2.yaml
File metadata and controls
109 lines (103 loc) · 3.43 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
# Configuration only. Do not combine with the existing candidate Compose files.
name: devcaught-https-browser-2k2
# Review contract, NOT application settings. Runtime confirmation is required.
x-review-contract:
canonical_origin: https://app.devcaught.test:8443
exact_trusted_origins:
- https://app.devcaught.test:8443
private_inbox_postgres_verified: false
application_uid: 1000
application_gid: 1000
services:
proxy:
# Fixed upstream release reviewed; digest/platform verification is pending.
image: caddy:2.11.7-alpine
pull_policy: never
container_name: devcaught-https-browser-proxy-2k2
init: true
restart: "no"
read_only: true
cap_drop: [ALL]
cap_add: [NET_BIND_SERVICE]
security_opt: [no-new-privileges:true]
command: [caddy, run, --config, /etc/caddy/Caddyfile, --adapter, caddyfile]
ports:
- target: 443
published: "8443"
host_ip: 127.0.0.1
protocol: tcp
volumes:
- type: bind
source: ./scripts/https-candidate/Caddyfile
target: /etc/caddy/Caddyfile
read_only: true
bind:
create_host_path: false
- type: volume
source: tls_data
target: /data
- type: volume
source: tls_config
target: /config
networks: [frontend]
logging:
driver: "none"
candidate:
# Must be an approved immutable NORMAL closed-guard candidate image, including
# /candidate-launch.mjs. No authorization-test image or build is permitted.
image: ${DEVCAUGHT_HTTPS_CANDIDATE_IMAGE:?Set reviewed immutable closed-guard image ID or digest}
pull_policy: never
container_name: devcaught-https-browser-app-2k2
init: true
restart: "no"
read_only: true
working_dir: /app
# Existing supervisor reads runtime secrets/chowns only the new volume, then
# launches the application as UID/GID 1000. The application is never root.
user: "0:0"
entrypoint: [node, /candidate-launch.mjs]
cap_drop: [ALL]
cap_add: [CHOWN, SETUID, SETGID, DAC_OVERRIDE]
security_opt: [no-new-privileges:true]
environment:
NODE_ENV: production
HOST: 0.0.0.0
PORT: "3000"
BETTER_AUTH_URL: https://app.devcaught.test:8443
VITE_AUTH_ENABLED: "true"
DEVCAUGHT_DB_PATH: /app/data/https-browser-synthetic-2k2.db
DEVCAUGHT_REQUIRE_PERSISTENT_DB: "1"
secrets:
- app_password
- better_auth_secret
volumes:
- type: volume
source: synthetic_inbox
target: /app/data
tmpfs:
- /tmp:rw,nosuid,nodev,noexec,size=64m,mode=1777
networks: [frontend, pg_dev]
# No ports: app, SMTP and ingestion are unreachable through host mappings.
logging:
driver: "none"
secrets:
# Runtime read-only file mounts; never provide these to an image build.
# Local Compose bind mounts retain host ownership/mode; no chmod is performed.
app_password:
file: ${DEVCAUGHT_AUTH_SECRET_DIR:?Set approved development secret directory}/app_password
better_auth_secret:
file: ${DEVCAUGHT_AUTH_SECRET_DIR:?Set approved development secret directory}/better_auth_secret
volumes:
synthetic_inbox:
name: devcaught_https_browser_2k2_synthetic_inbox
tls_data:
name: devcaught_https_browser_2k2_tls_data
tls_config:
name: devcaught_https_browser_2k2_tls_config
networks:
frontend:
name: devcaught_https_browser_2k2_frontend
internal: true
pg_dev:
external: true
name: devcaught_pg_dev_net