-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
72 lines (69 loc) · 2.52 KB
/
Copy pathdocker-compose.yml
File metadata and controls
72 lines (69 loc) · 2.52 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
63
64
65
66
67
68
69
70
71
72
services:
app:
build: .
ports:
- "4000:4000"
# Uncomment to enable HTTPS directly in Phoenix (no reverse proxy needed).
# Set GAMEND_TLS_CERTFILE and GAMEND_TLS_KEYFILE env vars below.
# - "443:443"
# Enable this to set custom env values
#env_file:
# - .env
environment:
# Run mix phx.gen.secret
GAMEND_AUTH_SECRET_KEY_BASE: 1DdaMAX56nUh1tvXniEEuQNsGNvgADndawxrJ3YFZlLXc9EOahC/NFDgowCDUFwb
# Path to server module plugins
GAMEND_CONTENT_PLUGINS_DIR: modules/plugins_examples
GAMEND_AUTH_DEVICE_AUTH_ENABLED: true
GAMEND_HTTP_HOST: localhost
# Disable this in prod
GAMEND_FEATURES_MAILBOX_PREVIEW: true
# ── HTTPS (uncomment to enable) ──
# GAMEND_TLS_CERTFILE: /etc/letsencrypt/live/${GAMEND_HTTP_HOST:-localhost}/fullchain.pem
# GAMEND_TLS_KEYFILE: /etc/letsencrypt/live/${GAMEND_HTTP_HOST:-localhost}/privkey.pem
# GAMEND_TLS_FORCE: "true"
# GAMEND_TLS_ACME_WEBROOT: /var/www/acme
# ── GeoIP (country lookup from IP) ──
# Download GeoLite2-Country.mmdb from MaxMind (free account required):
# https://dev.maxmind.com/geoip/geolite2-free-geolocation-data
# Place it at ./data/GeoLite2-Country.mmdb
GAMEND_CONTENT_GEOIP_DB_PATH: /app/data/GeoLite2-Country.mmdb
volumes:
- ./modules:/app/modules
- ./priv/static/images:/app/priv/static/images
- ./priv/static/theme.css:/app/priv/static/theme.css
- ./db:/app/db
- ./data:/app/data:ro
# Uncomment for HTTPS — mount Let's Encrypt certs and ACME webroot
# - ./certbot/conf:/etc/letsencrypt:ro
# - ./certbot/www:/var/www/acme:ro
extra_hosts:
- "host.docker.internal:host-gateway"
# ── Observability (Prometheus + Grafana) ──
# Prometheus scrapes /metrics from the app every 15s.
# Grafana auto-provisions Prometheus as a data source.
# Access Grafana at http://localhost:3000 (admin/admin).
prometheus:
image: prom/prometheus:latest
ports:
- "9090:9090"
volumes:
- ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro
- prometheus_data:/prometheus
depends_on:
- app
grafana:
image: grafana/grafana:latest
ports:
- "3000:3000"
environment:
GF_SECURITY_ADMIN_USER: admin
GF_SECURITY_ADMIN_PASSWORD: admin
volumes:
- ./grafana/provisioning:/etc/grafana/provisioning:ro
- grafana_data:/var/lib/grafana
depends_on:
- prometheus
volumes:
prometheus_data:
grafana_data: