-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
109 lines (104 loc) · 3.82 KB
/
docker-compose.yml
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
networks:
internal_network:
driver: bridge # the default
services:
proxy:
container_name: seed-proxy
image: caddy:2
depends_on:
- seed-daemon
- seed-web
ports:
- "80:80"
- "443:443"
- "443:443/udp"
restart: unless-stopped
networks:
- internal_network
environment:
- "SEED_SITE_HOSTNAME=${SEED_SITE_HOSTNAME}"
- "SEED_SITE_BACKEND_GRPCWEB_PORT=${SEED_SITE_BACKEND_GRPCWEB_PORT:-56001}"
- "SEED_SITE_LOCAL_PORT=${SEED_SITE_LOCAL_PORT:-3000}"
volumes:
- ${SEED_SITE_WORKSPACE}/proxy/data:/data
- ${SEED_SITE_WORKSPACE}/proxy/config:/config
- ${SEED_SITE_WORKSPACE}/proxy/CaddyFile:/etc/caddy/Caddyfile
seed-web:
container_name: seed-web
image: seedhypermedia/web:${SEED_SITE_TAG:-latest}
depends_on:
- seed-daemon
networks:
- internal_network
ports:
- "${SEED_SITE_LOCAL_PORT:-3000}:${SEED_SITE_LOCAL_PORT:-3000}"
restart: unless-stopped
volumes:
- ${SEED_SITE_WORKSPACE}/web:/data:rw
environment:
- "SEED_BASE_URL=${SEED_SITE_HOSTNAME}"
- "SEED_IS_GATEWAY=${SEED_IS_GATEWAY:-false}"
- "DAEMON_HTTP_URL=http://seed-daemon:${SEED_SITE_BACKEND_GRPCWEB_PORT:-56001}"
- "PORT=${SEED_SITE_LOCAL_PORT:-3000}"
- "DATA_DIR=/data"
seed-daemon:
container_name: seed-daemon
image: seedhypermedia/site:${SEED_SITE_TAG:-latest}
restart: unless-stopped
ports:
- "56000:56000"
- "56000:56000/udp"
networks:
- internal_network
environment:
- "SEED_P2P_TESTNET_NAME=${SEED_P2P_TESTNET_NAME}"
- "SEED_LOG_LEVEL=${SEED_LOG_LEVEL:-info}"
- "SENTRY_DSN=${SEED_SITE_SENTRY_DSN:-https://47c66bd7a6d64db68a59c03f2337e475@o4504088793841664.ingest.sentry.io/4505527493328896}"
volumes:
- ${SEED_SITE_WORKSPACE}/daemon:/data:rw
- ${SEED_SITE_MONITORING_WORKDIR:-./monitoring}/grafana:/exported_grafana:rw
- ${SEED_SITE_MONITORING_WORKDIR:-./monitoring}/prometheus:/exported_prometheus:rw
command: >
sh -c "rsync -a /monitoring/prometheus/ /exported_prometheus &&
rsync -a /monitoring/grafana/ /exported_grafana &&
seed-daemon -data-dir=/data -lndhub.mainnet -p2p.port=56000 --http.port=${SEED_SITE_BACKEND_GRPCWEB_PORT:-56001} -grpc.port=56002 -p2p.no-relay=true -p2p.force-reachability-public=true -syncing.smart=true -syncing.no-sync-back=true -syncing.no-pull=${SEED_SITE_NO_PULL:-false} -p2p.announce-addrs=/dns4/${SEED_SITE_DNS}/tcp/56000,/dns4/${SEED_SITE_DNS}/udp/56000/quic-v1 ${SEED_SITE_HOSTNAME}"
prometheus:
image: prom/prometheus:latest
restart: unless-stopped
container_name: prometheus
profiles:
- metrics
depends_on:
- seed-daemon
networks:
- internal_network
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
- prometheus-data:/prometheus
- ${SEED_SITE_MONITORING_WORKDIR:-./monitoring}/prometheus/prometheus.yaml:/etc/prometheus/prometheus.yml:ro
grafana:
image: grafana/grafana:main
restart: unless-stopped
container_name: grafana
depends_on:
- prometheus
profiles:
- metrics
networks:
- internal_network
volumes:
- grafana-data:/var/lib/grafana
- ${SEED_SITE_MONITORING_WORKDIR:-./monitoring}/grafana/dashboards:/etc/grafana/dashboards:ro
- ${SEED_SITE_MONITORING_WORKDIR:-./monitoring}/grafana/provisioning:/etc/grafana/provisioning:ro
environment:
GF_LOG_MODE: console
GF_PATHS_PROVISIONING: "/etc/grafana/provisioning"
GF_SERVER_HTTP_PORT: ${SEED_SITE_MONITORING_PORT:-3001}
GF_SERVER_PROTOCOL: "http"
GF_SERVER_DOMAIN: ${SEED_SITE_DNS:-localhost:3001}
GF_SERVER_ROOT_URL: ${SEED_SITE_HOSTNAME:-http}/.metrics
GF_SERVER_SERVE_FROM_SUB_PATH: True
volumes:
grafana-data: {}
prometheus-data: {}