-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcompose.yml
108 lines (101 loc) · 2.17 KB
/
compose.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
---
networks:
monitoring:
driver: bridge
volumes:
postgres_data: {}
node_volume: {}
redis_data: {}
prometheus_data: {}
grafana-data: {}
services:
db:
build:
context: .
dockerfile: Dockerfile.db
restart: always
shm_size: 256mb
volumes:
- postgres_data:/var/lib/postgresql/data
environment:
POSTGRES_DB: ${DATABASE_NAME:-db}
POSTGRES_PASSWORD: ${DATABASE_PASSWORD:-password}
POSTGRES_PORT: ${DATABASE_PORT:-5432}
POSTGRES_USER: ${DATABASE_USER:-user}
networks:
- monitoring
healthcheck:
test:
- "CMD-SHELL"
- |
pg_isready -U ${DATABASE_USER:-user} \
-d ${DATABASE_NAME:-db} \
-p ${DATABASE_PORT:-5432}
interval: 10s
timeout: 5s
retries: 5
redis:
image: redis:alpine
restart: always
ports:
- "6379:6379"
volumes:
- redis_data:/data
networks:
- monitoring
web-prod:
build:
context: .
dockerfile: Dockerfile
volumes:
- .:/app
restart: always
ports:
- "8000:8000"
depends_on:
- db
- redis
networks:
- monitoring
web-dev:
build:
context: .
dockerfile: Dockerfile.dev
volumes:
- .:/app
- node_volume:/app/node_modules
restart: always
ports:
- "8001:8000"
depends_on:
- db
- redis
networks:
- monitoring
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=/etc/prometheus/console_libraries'
- '--web.console.templates=/etc/prometheus/consoles'
- '--web.enable-lifecycle'
ports:
- 9090:9090
networks:
- monitoring
grafana:
image: grafana/grafana-oss:latest
container_name: grafana
ports:
- '3000:3000'
volumes:
- grafana-data:/var/lib/grafana
restart: unless-stopped
networks:
- monitoring