-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
62 lines (58 loc) · 1.93 KB
/
Copy pathdocker-compose.prod.yml
File metadata and controls
62 lines (58 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Production override for the GCE VM: adds Caddy (TLS termination) and
# Grafana Alloy (metrics + logs shipping to Grafana Cloud).
#
# Selected on the VM via COMPOSE_FILE=docker-compose.yml:docker-compose.prod.yml
# in /opt/coderunner/.env, so a plain `docker compose up -d` runs the full
# stack. The referenced config files are rendered at boot by cloud-init's
# render-env.sh (see deploy/cloud-init/user-data.yaml):
# /opt/coderunner/caddy/Caddyfile domain + reverse_proxy control:4000
# /opt/coderunner/alloy/config.alloy Grafana Cloud credentials + pipelines
#
# Forks that don't ship telemetry to Grafana Cloud can delete the alloy
# service (and its render step) — nothing else depends on it.
services:
control:
logging:
driver: json-file
options:
max-size: "50m"
max-file: "3"
caddy:
image: caddy:2
restart: unless-stopped
ports:
- "80:80"
- "443:443"
- "443:443/udp"
volumes:
- /opt/coderunner/caddy/Caddyfile:/etc/caddy/Caddyfile:ro
- caddy_data:/data
- caddy_config:/config
networks:
- coderunner
depends_on:
- control
alloy:
image: grafana/alloy:${ALLOY_VERSION:-v1.5.1}
restart: unless-stopped
command:
- run
- --storage.path=/var/lib/alloy/data
- /etc/alloy/config.alloy
volumes:
- /opt/coderunner/alloy/config.alloy:/etc/alloy/config.alloy:ro
# Read-only socket access for discovery.docker + loki.source.docker
# (container log collection — journald is not used in this deployment).
- /var/run/docker.sock:/var/run/docker.sock:ro
- alloy_data:/var/lib/alloy/data
# Host filesystem for the node/unix exporter (Alloy runs in a container,
# so it must read the host's /proc, /sys, and / explicitly).
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /:/rootfs:ro
networks:
- coderunner
volumes:
caddy_data:
caddy_config:
alloy_data: