-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathcompose-local.yml
83 lines (78 loc) · 2.46 KB
/
compose-local.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
services:
traefik:
image: traefik:v3.2
command:
- "--api.insecure=true"
- "--providers.docker"
- "--log.level=DEBUG"
- "--metrics.prometheus=true"
- "--metrics.prometheus.buckets=0.100000, 0.300000, 1.200000, 5.000000"
labels:
- "traefik.http.routers.traefik.rule=Host(`traefik.docker.localhost`)"
- "traefik.http.routers.traefik.service=api@internal"
- "traefik.http.middlewares.traefik-auth.basicauth.users=admin:$$apr1$$Y94HY0fa$$q6.kAMp1YjLvRJsXrbv8x1"
- "traefik.http.routers.traefik.middlewares=traefik-auth"
ports:
- "80:80"
- "8081:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
prometheus:
image: prom/prometheus
volumes:
- ./prometheus/:/etc/prometheus
- 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"
grafana:
image: grafana/grafana
depends_on:
- prometheus
volumes:
- grafana_data:/var/lib/grafana
- ./grafana/provisioning/:/etc/grafana/provisioning/
env_file:
- ./grafana/config.monitoring
labels:
- "traefik.http.routers.grafana.rule=Host(`grafana.docker.localhost`)"
- "traefik.http.routers.grafana.service=grafana"
- "traefik.http.services.grafana.loadbalancer.server.port=3000"
optiguide:
build: .
environment:
- GOOGLE_ID=${GOOGLE_ID}
- GOOGLE_SECRET=${GOOGLE_SECRET}
- GOOGLE_CALLBACK_URL=http://localhost:8080/auth/google/callback
- SESSION_SECRET=${SESSION_SECRET}
- POSTGRES_USER=optiguide
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=optiguide
- POSTGRES_HOST=postgres
ports:
- "8080:8080"
labels:
- "traefik.http.routers.optiguide.rule=Host(`optiguide.docker.localhost`)"
depends_on:
postgres:
condition: service_healthy
postgres:
image: postgres:17-alpine3.20
environment:
- POSTGRES_USER=optiguide
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=optiguide
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U optiguide"]
interval: 10s
timeout: 5s
retries: 5
volumes:
- postgres_data:/var/lib/postgresql/data
volumes:
postgres_data:
prometheus_data:
grafana_data: