Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
41 lines (40 loc) · 1.93 KB
/
Copy pathdocker-compose.yml
File metadata and controls
41 lines (40 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
services:
codeg:
build: .
# Or use a pre-built image:
# image: xintaofei/codeg:latest
ports:
- "3080:3080"
# Port bridge for dev servers started by agents inside the container:
# the workbench shows `http://localhost:3000` from the container through
# one of these ports (one per dev server). Publish the same range you set
# in CODEG_BRIDGE_PORTS (default: the ten ports after CODEG_PORT).
# Drop this line if you set CODEG_BRIDGE_HOST_PATTERN below.
- "3081-3090:3081-3090"
volumes:
- codeg-data:/data
# Mount your project directories (optional):
# - /path/to/projects:/projects
environment:
- CODEG_TOKEN=${CODEG_TOKEN:-}
- CODEG_PORT=3080
- CODEG_HOST=0.0.0.0
# - CODEG_BRIDGE_PORTS=3081-3090 # or `off` to disable the port bridge
# Name the dev servers by hostname instead of giving each one a port:
# `3000.codeg.example.com` reaches the container's port 3000 over the
# published 3080, so nothing above has to be published and no range has
# to be guessed. Needs a wildcard DNS record for the name and, behind a
# reverse proxy, a wildcard vhost pointing at this service and passing
# `Host` through (Caddy: `*.codeg.example.com { reverse_proxy codeg:3080 }`).
# `auto` puts the port one label in front of whatever host the workbench
# itself was opened at.
# - CODEG_BRIDGE_HOST_PATTERN=auto
# In-place upgrades (Settings → Software Update) rewrite the binaries and
# web assets inside this container's writable layer, not the image. The
# codeg-data volume persists, but an upgrade lives only in the running
# container: recreating it (`--force-recreate`, or recreating after a
# `docker pull`) starts from the image again and drops the upgrade. Build or
# pull an image at the new version and recreate to make it permanent.
restart: unless-stopped
volumes:
codeg-data: