This repository has been archived by the owner on Oct 2, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
qa.yml
110 lines (109 loc) · 4.2 KB
/
qa.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
110
version: "3.3"
services:
backend:
image: zenith110/pubsub-python-backend-qa
ports:
- "6080:8080"
labels:
- traefik.enable=true
- traefik.http.routers.backend.rule=Host(${BACKEND_URL})
- traefik.http.routers.backend.entrypoints=web
container_name: backend
discord-bot:
image: zenith110/pubsub-bot-qa
container_name: bot
env_file:
- .env
pubsub-api-grapqhl:
image: zenith110/pubsub-graphql-qa
container_name: grapqhl
ports:
- "8443:8443"
env_file:
- .env
labels:
- traefik.enable=true
- traefik.http.routers.pubsub-api-graphql.rule=Host(${GRAPHQL_URL})
- traefik.http.routers.pubsub-api-graphql.entrypoints=web
prometheus:
image: prom/prometheus:latest
container_name: prometheus
restart: unless-stopped
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
- prometheus_data:/prometheus
command:
- "--config.file=/etc/prometheus/prometheus.yml"
- "--storage.tsdb.path=/prometheus"
- "--web.console.libraries=/usr/share/prometheus/console_libraries"
- "--web.console.templates=/usr/share/prometheus/consoles"
ports:
- 9090:9090
traefik:
image: traefik/whoami
restart: always
container_name: "traefik"
ports:
- "8080:8080"
- "80:80"
- "443:443"
command:
- --api.insecure=true # <== Enabling insecure api, NOT RECOMMENDED FOR PRODUCTION
- --api.dashboard=true # <== Enabling the dashboard to view services, middlewares, routers, etc.
- --api.debug=true # <== Enabling additional endpoints for debugging and profiling
- --log.level=DEBUG # <== Setting the level of the logs from traefik
- --providers.docker=true # <== Enabling docker as the provider for traefik
- --providers.docker.exposedbydefault=false # <== Don't expose every container to traefik
- --providers.file.filename=/dynamic.yaml # <== Referring to a dynamic configuration file
- --providers.docker.network=web # <== Operate on the docker network named web
- --entrypoints.web.address=:80 # <== Defining an entrypoint for port :80 named web
#- --certificatesresolvers.mytlschallenge.acme.tlschallenge=true # <== Enable TLS-ALPN-01 (not really needed)
#- --certificatesresolvers.mytlschallenge.acme.email=you@youremail # <== Set your email (not really needed)
#- --certificatesresolvers.mytlschallenge.acme.storage=/letsencrypt/acme.json # <== SSL stuff we don't need.
volumes:
#- ./letsencrypt:/letsencrypt # <== Volume for certs (TLS) (not really needed)
- /var/run/docker.sock:/var/run/docker.sock # <== Volume for docker admin
- ./dynamic.yml:/dynamic.yml # <== Volume for dynamic conf file, **ref: line 27
labels:
- "traefik.enable=true" # <== Enable traefik on itself to view dashboard and assign subdomain to$
- "traefik.http.routers.api.rule=Host(`qa.pubsub-api.dev`)" # <== Setting the domain for the d$
- "traefik.http.routers.api.service=api@internal" # <== Enabling the api to be a service to acce$
loki:
image: grafana/loki
container_name: loki
command: "-config.file=/etc/loki/config/loki-config.yml"
ports:
- "3100:3100"
volumes:
- ./loki-config.yml:/etc/loki/config/loki-config.yml
- ./loki-data:/etc/loki
- ./loki-data/data:/data/loki
- ./loki-data/index:/opt/loki/index
- ./loki-data/chunks:/opt/loki/chunks
restart: "unless-stopped"
tempo:
image: grafana/tempo
container_name: tempo
promtail:
image: grafana/promtail
container_name: promtail
user: root
volumes:
- ./promtail_storage/logs:/var/logs
- ./promtail-config.yml:/etc/promtail/config/promtail-config.yml
- ./var/log:/var/log
ports:
- "9080:9080"
restart: "unless-stopped"
command: "-config.file=/etc/promtail/config/promtail-config.yml"
node_exporter:
image: quay.io/prometheus/node-exporter:latest
container_name: node_exporter
command:
- "--path.rootfs=/host"
pid: host
restart: unless-stopped
volumes:
- "/:/host:ro,rslave"
volumes:
prometheus_data: