-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
112 lines (102 loc) · 2.15 KB
/
docker-compose.yml
File metadata and controls
112 lines (102 loc) · 2.15 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
version: "3"
services:
app:
build: ./app
restart: always
env_file:
- .env
ports:
- "9005:9005"
volumes:
- static:/static
- app_logs:/applogs
depends_on:
- db
- broker
server:
image: nginx:alpine
restart: always
ports:
- "80:80"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
- static:/www/static:ro
- nginx_logs:/var/log/nginx/export
depends_on:
- app
broker:
image: rabbitmq:management-alpine
restart: always
ports:
- "8080:15672"
- "5672:5672"
env_file:
- .env
worker:
build:
context: ./app
dockerfile: Dockerfile_celery
restart: always
env_file:
- .env
depends_on:
- broker
volumes:
- worker_logs:/applogs
db:
build:
context: ./postgresql
restart: always
env_file:
- .env
volumes:
- db:/var/lib/postgresql/data
- db_logs:/var/log/export
loki:
image: grafana/loki:2.9.4
ports:
- "3100:3100"
command: -config.file=/etc/loki/local-config.yaml -log.level=warn
promtail:
image: grafana/promtail:2.9.4
volumes:
- ./promtail_config.yml:/etc/promtail/config.yml
- nginx_logs:/var/log/nginx
- app_logs:/var/log/app
- worker_logs:/var/log/worker
- db_logs:/var/log/db
command: -config.file=/etc/promtail/config.yml
grafana:
environment:
- GF_PATHS_PROVISIONING=/etc/grafana/provisioning
- GF_AUTH_ANONYMOUS_ENABLED=true
- GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
entrypoint:
- sh
- -euc
- |
mkdir -p /etc/grafana/provisioning/datasources
cat <<EOF > /etc/grafana/provisioning/datasources/ds.yaml
apiVersion: 1
datasources:
- name: Loki
type: loki
access: proxy
orgId: 1
url: http://loki:3100
basicAuth: false
isDefault: true
version: 1
editable: false
EOF
/run.sh
image: grafana/grafana:latest
ports:
- "3000:3000"
volumes:
static:
db:
nginx_logs:
app_logs:
worker_logs:
db_logs: