Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
57 lines (55 loc) · 2.02 KB
/
Copy pathdocker-compose.yml
File metadata and controls
57 lines (55 loc) · 2.02 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
# Shared with the otel stack so telemetry never leaves the host. Created by
# /home/jonathan/otel/prod.sh; declared external here so this stack does not
# own its lifetime.
networks:
otel:
name: otel
external: true
services:
course-heatmap:
build:
context: .
dockerfile: Dockerfile
environment:
- NODE_ENV=production
- DATABASE_PATH=/app/storage/app.db
# Page views and traces go to otel.snowse.io. This site has no login, so
# its events say how much it is used, not by whom -- see otel.mjs.
- OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4318
- OTEL_SERVICE_NAME=snowse-heatmap
- OTEL_ENVIRONMENT=prod
# Login, via the same Keycloak realm and the same client id as
# tools.snowse.io. That client is public (PKCE, no secret), so the only
# secret here is SESSION_SECRET, which seals the session cookie.
- OIDC_ISSUER=https://engineering.snow.edu/auth/realms/SnowCollege
- OIDC_CLIENT_ID=snowse-tools
- OIDC_REDIRECT_URI=https://courseheatmap.snowse.io/auth/callback
- OIDC_IDP_HINT=snowcollege
# Who gets in once Keycloak has vouched for them. Anyone outside these
# domains is turned away at /auth/denied.
- ALLOWED_EMAIL_DOMAINS=snow.edu,students.snow.edu
- SESSION_SECRET=${SESSION_SECRET:?set SESSION_SECRET in .env}
volumes:
- ./storage:/app/storage
restart: unless-stopped
networks:
# "default" must be listed explicitly: naming any network opts the
# service out of joining the default one.
- default
- otel
cloudflare-tunnel:
image: cloudflare/cloudflared
restart: unless-stopped
command: tunnel --no-autoupdate run
depends_on:
- course-heatmap
volumes:
- /etc/localtime:/etc/localtime:ro
environment:
- TUNNEL_TOKEN=${CLOUDFLARE_TUNNEL_TOKEN:?set CLOUDFLARE_TUNNEL_TOKEN in .env}
healthcheck:
test: ['CMD', 'cloudflared', '--version']
interval: 30s
timeout: 10s
retries: 3
start_period: 10s