-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.dev.yaml
More file actions
73 lines (72 loc) · 1.57 KB
/
Copy pathcompose.dev.yaml
File metadata and controls
73 lines (72 loc) · 1.57 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
services:
web:
env_file:
- .env.dev
build:
context: .
dockerfile: ./Dockerfile.dev
ports:
- 80:8080
depends_on:
db:
condition: service_healthy
command: >
sh -c "python manage.py makemigrations --no-input &&
python manage.py migrate --no-input &&
python manage.py collectstatic --no-input &&
python manage.py runserver 0.0.0.0:8080"
volumes:
- static_volume:/app/staticfiles
- media_volume:/app/mediafiles
logging:
driver: json-file
options:
max-size: 10m
max-file: "3"
db:
image: postgres:14-alpine
env_file:
- .env.dev
volumes:
- postgres_data:/var/lib/postgresql/data
expose:
- "5432"
restart: always
healthcheck:
test: ["CMD-SHELL", "pg_isready -h db -p 5432 -U $$POSTGRES_USER"]
interval: 5s
timeout: 5s
retries: 5
prometheus:
image: prom/prometheus
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
expose:
- "9090"
depends_on:
- web
loki:
image: grafana/loki:latest
expose:
- "3100"
depends_on:
- promtail
promtail:
image: grafana/promtail:latest
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./promtail-config.yml:/etc/promtail/config.yml
command: -config.file=/etc/promtail/config.yml
grafana:
image: grafana/grafana:latest
env_file:
- .env.dev
ports:
- 3000:3000
depends_on:
- prometheus
- loki
volumes:
postgres_data:
static_volume:
media_volume: