-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yaml
More file actions
140 lines (139 loc) · 3.67 KB
/
compose.yaml
File metadata and controls
140 lines (139 loc) · 3.67 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
services:
traefik:
image: traefik:3.5
container_name: traefik
command:
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entryPoints.web.address=:80"
#- "--log.level=DEBUG"
# web ui (remove for prod)
- "--api.insecure=true"
ports:
- 80:80
- 443:443
# web ui (remove for prod)
- 8080:8080
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
website:
build:
context: website
expose:
- 5173
labels:
- "traefik.enable=true"
- "traefik.http.routers.website.rule=Host(`short.com`)"
- "traefik.http.routers.website.entrypoints=web"
- "traefik.http.services.website.loadbalancer.server.port=5173"
environment:
- VITE_DOMAIN_LONG=short.com
- VITE_DOMAIN_SHORT=sho.rt
develop:
watch:
- path: ./website
action: sync
target: /app
ignore:
- node_modules
server:
build:
context: .
dockerfile: dockerfile
expose:
- 3000
labels:
- "traefik.enable=true"
- "traefik.http.routers.server.rule=Host(`sho.rt`)"
- "traefik.http.routers.server.entrypoints=web"
- "traefik.http.services.server.loadbalancer.server.port=3000"
environment:
- APP_ENV=${APP_ENV}
- LOG_TO_STDOUT=${LOG_TO_STDOUT}
- DATABASE_URL=${DATABASE_URL}
- REDIS_URL=${REDIS_URL}
- OTEL_EXPORTER_OTLP_PROTOCOL=${OTEL_EXPORTER_OTLP_PROTOCOL}
- OTEL_METRIC_EXPORT_INTERVAL=${OTEL_METRIC_EXPORT_INTERVAL}
- OTEL_SERVICE_NAME=${OTEL_SERVICE_NAME}
- OTEL_EXPORTER_OTLP_METRICS_ENDPOINT=${OTEL_EXPORTER_OTLP_METRICS_ENDPOINT}
- OTEL_EXPORTER_OTLP_LOGS_ENDPOINT=${OTEL_EXPORTER_OTLP_LOGS_ENDPOINT}
- OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=${OTEL_EXPORTER_OTLP_TRACES_ENDPOINT}
depends_on:
postgres:
condition: service_started
redis:
condition: service_started
volumes:
- ./:/app
postgres:
image: postgres:17.5-alpine
user: postgres
volumes:
- postgres-data:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=example
expose:
- 5432
healthcheck:
test: ["CMD", "pg_isready"]
interval: 10s
timeout: 5s
retries: 5
redis:
image: redis:8.0-alpine
volumes:
- redis-data:/data
expose:
- 6379
tempo:
image: grafana/tempo:2.8.1
command: ["-config.file=/etc/tempo.yaml"]
volumes:
- ./tempo/tempo.yaml:/etc/tempo.yaml:ro
- tempo-data:/var/tempo
expose:
- 3200 # tempo
- 9095 # tempo grpc
- 4317 # otlp grpc
- 4318 # otlp http
attach: false
loki:
image: grafana/loki:3.5
expose:
- 3100
volumes:
- loki-data:/loki
- ./loki/loki.yaml:/etc/loki/loki.yaml
attach: false
prometheus:
image: prom/prometheus:v3.5.0
command:
- "--web.enable-otlp-receiver"
- "--config.file=/etc/prometheus/prometheus.yml"
- "--storage.tsdb.path=/prometheus"
ports:
- 9090:9090
volumes:
- prometheus-data:/prometheus
- ./prometheus:/etc/prometheus/
attach: false
grafana:
image: grafana/grafana:12.1.0
expose:
- 3000
volumes:
- grafana-data:/var/lib/grafana
- ./grafana:/etc/grafana/provisioning/datasources/
labels:
- "traefik.enable=true"
- "traefik.http.routers.grafana.rule=Host(`grafana.short.com`)"
- "traefik.http.routers.grafana.entrypoints=web"
- "traefik.http.services.grafana.loadbalancer.server.port=3000"
attach: false
volumes:
postgres-data:
redis-data:
prometheus-data:
grafana-data:
loki-data:
tempo-data: