Files
codex-http-gateway/compose.yaml
T
codex-bot 878034958f
Check Codex HTTP gateway / verify (push) Successful in 11m53s
Add authenticated Codex HTTP gateway and worker
2026-12-01 18:36:45 +08:00

60 lines
1.5 KiB
YAML

name: codex-http-gateway
services:
gateway:
build:
context: .
target: gateway
restart: unless-stopped
init: true
read_only: true
cap_drop: [ALL]
security_opt: ["no-new-privileges:true"]
pids_limit: 64
mem_limit: 128m
ports:
- "127.0.0.1:${GATEWAY_PORT:-18080}:8080"
networks: [gateway-ingress]
volumes:
- type: bind
source: ${GATEWAY_KEYS_FILE:-/opt/codex-http-gateway/keys.sha256}
target: /run/secrets/gateway-keys.sha256
read_only: true
bind:
create_host_path: false
- type: bind
source: ${GATEWAY_RUN_DIR:-/opt/codex-http-gateway/run}
target: /run/codex-gateway
read_only: true
bind:
create_host_path: false
worker:
build:
context: .
target: worker
restart: unless-stopped
init: true
read_only: true
cap_drop: [ALL]
security_opt: ["no-new-privileges:true"]
pids_limit: 128
mem_limit: 1g
tmpfs:
- /tmp:rw,nosuid,nodev,noexec,mode=1777,size=64m
environment:
CODEX_MODEL: ${CODEX_MODEL:-}
networks: [worker-egress]
volumes:
- type: bind
source: ${GATEWAY_RUN_DIR:-/opt/codex-http-gateway/run}
target: /run/codex-gateway
bind:
create_host_path: false
- type: bind
source: ${CODEX_AUTH_DIR:-/opt/codex-http-gateway/codex-home}
target: /var/lib/codex
bind:
create_host_path: false
networks:
gateway-ingress:
worker-egress: