Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
46 lines (45 loc) · 1.93 KB
/
Copy pathdocker-compose.yml
File metadata and controls
46 lines (45 loc) · 1.93 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
services:
codex-proxy:
image: ghcr.io/icebear0828/codex-proxy:latest
# To build from source instead: comment out 'image' above, uncomment 'build' below
# build: .
extra_hosts:
- "host.docker.internal:host-gateway"
ports:
# Loopback-only on the host by default; change to "${PORT:-8080}:8080"
# if you intentionally want LAN access.
- "127.0.0.1:${PORT:-8080}:8080"
- "1455:1455"
# Optional Ollama-compatible bridge. Enable ollama.enabled and use
# ollama.host=0.0.0.0 inside the container before uncommenting.
# Host binding stays loopback-only to avoid exposing the unauthenticated
# Ollama API to the LAN.
# - "127.0.0.1:${OLLAMA_BRIDGE_PORT:-11434}:11434"
volumes:
- ./data:/app/data
- ./config:/app/config
restart: unless-stopped
# Without an explicit memory limit, Node/V8 sizes its default heap off the
# *host's* total memory, not this container's. On a shared host that means
# the process can grow well past what you actually want it to use before
# GC gets aggressive, and if the host is memory-constrained that growth can
# take the whole machine down before this container ever gets OOM-killed.
# Tune both to your host by setting MEM_LIMIT and NODE_OPTIONS in .env:
# mem_limit should leave headroom for everything else running there, and
# --max-old-space-size should stay comfortably below mem_limit (V8's heap
# is only part of the process's RSS).
mem_limit: ${MEM_LIMIT:-768m}
env_file:
- .env
environment:
- NODE_ENV=production
- PORT=8080
- CODEX_PROXY_HOST=0.0.0.0
- NODE_OPTIONS=${NODE_OPTIONS:---max-old-space-size=512}
# -- Automatic updates (uncomment to enable) --
# watchtower:
# image: containrrr/watchtower
# volumes:
# - /var/run/docker.sock:/var/run/docker.sock
# command: --cleanup --interval 3600 codex-proxy
# restart: unless-stopped