-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
112 lines (108 loc) · 4.31 KB
/
docker-compose.yaml
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
110
111
112
version: "3.8"
networks:
o1labs-benchmarking:
driver: bridge
services:
traefik:
depends_on:
- influxdb
- grafana
image: "traefik:latest"
networks:
- ${NETWORK_NAME}
command:
- "--log.level=DEBUG"
# - "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
- "--entrypoints.websecure.address=:443"
- "--entrypoints.grafana.address=:3000"
- "--entrypoints.grafana.http.redirections.entrypoint.scheme=https"
- "--entrypoints.influxdb.address=:8086"
- "--entrypoints.influxdb.http.redirections.entrypoint.scheme=https"
- "--certificatesresolvers.myresolver.acme.dnschallenge=true"
- "--certificatesresolvers.myresolver.acme.dnschallenge.provider=namecheap"
# - "--certificatesresolvers.myresolver.acme.dnschallenge.provider=cloudflare"
# - "--certificatesresolvers.myresolver.acme.caserver=https://acme-staging-v02.api.letsencrypt.org/directory"
- "--certificatesresolvers.myresolver.acme.storage=/letsencrypt/acme.json"
ports:
- "80:80"
- "443:443"
environment:
NAMECHEAP_API_USER: ${NAMECHEAP_API_USER}
NAMECHEAP_API_KEY: ${NAMECHEAP_API_KEY}
# CF_API_EMAIL: ${CF_API_EMAIL}
# CF_API_KEY: ${CF_API_KEY}
volumes:
- "./letsencrypt:/letsencrypt"
- "/var/run/docker.sock:/var/run/docker.sock:ro"
influxdb:
image: influxdb:${INFLUXDB_VERSION}
networks:
- ${NETWORK_NAME}
ports:
- "8086:8086"
volumes:
- "./deployment/influxdb/init:/docker-entrypoint-initdb.d"
- "./influxdb-data:/var/lib/influxdb2"
- "./influxdb-config:/etc/influxdb2"
environment:
DOCKER_INFLUXDB_INIT_MODE: setup
DOCKER_INFLUXDB_INIT_USERNAME: ${INFLUXDB_USERNAME}
DOCKER_INFLUXDB_INIT_PASSWORD: ${INFLUXDB_PASSWORD}
DOCKER_INFLUXDB_INIT_ORG: ${INFLUXDB_ORG}
DOCKER_INFLUXDB_INIT_BUCKET: ${INFLUXDB_BUCKET}
DOCKER_INFLUXDB_INIT_ADMIN_TOKEN: ${INFLUXDB_TOKEN}
INFLUXDB_HTTP_AUTH_ENABLED: true
INFLUXDB_HTTP_SHARED_SECRET: ${INFLUXDB_TOKEN}
INFLUXDB_USERNAME: ${INFLUXDB_USERNAME}
INFLUXDB_PASSWORD: ${INFLUXDB_PASSWORD}
labels:
- "traefik.enable=true"
- "traefik.http.routers.influxdb.rule=Host(`${INFLUXDB_FQDN}`)"
- "traefik.http.routers.influxdb.entrypoints=websecure,influxdb"
- "traefik.http.routers.influxdb.tls.certresolver=myresolver"
- "traefik.http.services.influxdb.loadbalancer.server.port=8086"
grafana:
depends_on:
- influxdb
image: grafana/grafana
networks:
- ${NETWORK_NAME}
ports:
- "3000:3000"
volumes:
- "./deployment/grafana/:/etc/grafana/provisioning"
- "/etc/localtime:/etc/localtime:ro"
environment:
# Disable Grafana's internal metrics available at /metrics
GF_METRICS_ENABLED: false
GF_AUTH_DISABLE_LOGIN_FORM: 0
GF_AUTH_ANONYMOUS_ENABLED: 1
GF_AUTH_BASIC_ENABLED: 0
GF_AUTH_GOOGLE_ENABLED: 1
GF_AUTH_GOOGLE_AUTH_URL: https://accounts.google.com/o/oauth2/auth
GF_AUTH_GOOGLE_TOKEN_URL: https://accounts.google.com/o/oauth2/token
GF_AUTH_GOOGLE_CLIENT_ID: ${GF_AUTH_GOOGLE_CLIENT_ID}
GF_AUTH_GOOGLE_CLIENT_SECRET: ${GF_AUTH_GOOGLE_CLIENT_SECRET}
GF_AUTH_GOOGLE_ALLOWED_DOMAINS: ${GF_AUTH_GOOGLE_ALLOWED_DOMAINS}
GF_AUTH_GOOGLE_SCOPES: ${GF_AUTH_GOOGLE_SCOPES}
GF_SECURITY_ADMIN_USER: ${GF_SECURITY_ADMIN_USER}
GF_SECURITY_ADMIN_PASSWORD: ${GF_SECURITY_ADMIN_PASSWORD}
GF_AUTH_ANONYMOUS_ORG_ROLE: ${GF_AUTH_ANONYMOUS_ORG_ROLE}
GF_AUTH_ORG_ROLE: ${GF_AUTH_ORG_ROLE}
GF_SERVER_ROOT_URL: https://${GRAFANA_FQDN}:443
GF_SERVER_DOMAIN: ${GRAFANA_FQDN}
INFLUXDB_PASSWORD: ${INFLUXDB_PASSWORD}
INFLUXDB_AUTH_HEADER: ${INFLUXDB_AUTH_HEADER}
INFLUXDB_ORG: ${INFLUXDB_ORG}
INFLUXDB_BUCKET: ${INFLUXDB_BUCKET}
INFLUXDB_TOKEN: ${INFLUXDB_TOKEN}
labels:
- "traefik.enable=true"
- "traefik.http.routers.grafana.rule=Host(`${GRAFANA_FQDN}`)"
- "traefik.http.routers.grafana.entrypoints=websecure,grafana"
- "traefik.http.routers.grafana.tls.certresolver=myresolver"
- "traefik.http.services.grafana.loadbalancer.server.port=3000"