-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-stack.yml
More file actions
145 lines (137 loc) · 3.92 KB
/
Copy pathdocker-stack.yml
File metadata and controls
145 lines (137 loc) · 3.92 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
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
version: "3.8"
networks:
app:
external: true
volumes:
etcd_data:
driver: local
prometheus_data:
driver: local
grafana_data:
driver: local
secrets:
jwt_access_secret:
file: ./jwt_secret_access.txt
jwt_refresh_secret:
file: ./jwt_refresh_secret.txt
services:
traefik:
image: traefik:v3.4
command:
- "--providers.swarm=true"
- "--providers.swarm.exposedByDefault=false"
- "--entrypoints.web.address=:80"
- "--api"
- "--ping"
- "--accesslog"
ports:
- "80:80"
networks:
- app
volumes:
- /var/run/docker.sock:/var/run/docker.sock
deploy:
mode: global
placement:
constraints: [node.role == manager]
labels:
- "traefik.enable=true"
- "traefik.swarm.network=app"
- "traefik.http.routers.ping.rule=Path(`/ping`)"
- "traefik.http.routers.ping.entrypoints=web"
- "traefik.http.routers.ping.service=ping@internal"
- "traefik.http.routers.traefik.rule=Host(`traefik.endure.software`)"
- "traefik.http.routers.traefik.entrypoints=web"
- "traefik.http.routers.traefik.service=api@internal"
- "traefik.http.services.traefik.loadbalancer.server.port=8080"
go-app:
image: farahtharwat35/dee-backend:latesttt
networks:
- app
depends_on:
- etcd
command: >
./go-app --port=8080 --debug=true --etcd-endpoints=http://10.128.0.18:2379,http://10.128.0.19:2379,http://10.128.0.20:2379
secrets:
- jwt_access_secret
- jwt_refresh_secret
deploy:
mode: replicated
replicas: 2
restart_policy:
condition: on-failure
update_config:
parallelism: 1
delay: 10s
labels:
- "traefik.enable=true"
- "traefik.http.routers.go.rule=Host(`api.endure.software`)"
- "traefik.http.routers.go.entrypoints=web"
- "traefik.http.services.go.loadbalancer.server.port=8080"
node-exporter:
image: prom/node-exporter
command:
- "--path.rootfs=/host"
volumes:
- "/:/host:ro,rslave"
networks:
- app
deploy:
mode: global
restart_policy:
condition: on-failure
labels:
- "traefik.enable=false"
prometheus:
image: salmaelsoly/dee-prometheus:latest
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"
volumes:
- prometheus_data:/prometheus
networks:
- app
deploy:
replicas: 1
restart_policy:
condition: on-failure
update_config:
parallelism: 1
delay: 10s
labels:
- "traefik.enable=true"
- "traefik.http.routers.prometheus.rule=Host(`prometheus.endure.software`)"
- "traefik.http.routers.prometheus.entrypoints=web"
- "traefik.http.services.prometheus.loadbalancer.server.port=9090"
grafana:
image: salmaelsoly/dee-grafana:latest
volumes:
- grafana_data:/var/lib/grafana
networks:
- app
deploy:
labels:
- "traefik.enable=true"
- "traefik.http.routers.grafana.rule=Host(`grafana.endure.software`)"
- "traefik.http.routers.grafana.entrypoints=web"
- "traefik.http.services.grafana.loadbalancer.server.port=3000"
frontend:
image: farahtharwat35/dee-frontend:latestt
networks:
- app
environment:
- VITE_API_URL=http://api.endure.software/api/v1
deploy:
replicas: 2
restart_policy:
condition: on-failure
update_config:
parallelism: 1
delay: 10s
labels:
- "traefik.enable=true"
- "traefik.http.routers.frontend.rule=Host(`ui.endure.software`)"
- "traefik.http.routers.frontend.entrypoints=web"
- "traefik.http.services.frontend.loadbalancer.server.port=80"