-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-stack.yml
149 lines (149 loc) · 3.09 KB
/
docker-stack.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
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
141
142
143
144
145
146
147
148
149
services:
caddy:
image: caddy:alpine
networks:
default: null
ports:
- mode: ingress
target: 80
published: 80
protocol: tcp
- mode: ingress
target: 443
published: 443
protocol: tcp
volumes:
- type: bind
source: /home/rovel/dev/profana/Caddyfile.dev
target: /etc/caddy/Caddyfile
bind:
create_host_path: true
# deploy:
# placement:
# constraints:
# - node.labels.node_type == lb
db:
environment:
POSTGRES_DB: profana_development
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
image: postgres:11.1
networks:
default: null
volumes:
- type: volume
source: postgres
target: /var/lib/postgresql/data
volume: {}
grafana:
environment:
ADMIN_PASSWORD: admin
ADMIN_USER: admin
image: grafana/grafana:latest
links:
- prometheus
- loki
- promtail
networks:
default: null
ports:
- mode: ingress
target: 3000
published: 3001
protocol: tcp
volumes:
- type: volume
source: grafana_data
target: /var/lib/grafana
volume: {}
loki:
command:
- -config.file=/etc/loki/local-config.yaml
image: grafana/loki:2.9.0
networks:
default: null
ports:
- mode: ingress
target: 3100
published: 3100
protocol: tcp
volumes:
- type: bind
source: /home/rovel/dev/profana/loki-config.yaml
target: /etc/loki/local-config.yml
bind:
create_host_path: true
prometheus:
image: prom/prometheus:latest
networks:
default: null
ports:
- mode: ingress
target: 9090
published: 9090
protocol: tcp
volumes:
- type: bind
source: /home/rovel/dev/profana/prometheus.yaml
target: /etc/prometheus/prometheus.yaml
bind:
create_host_path: true
promtail:
command:
- -config.file=/etc/promtail/config.yml
image: grafana/promtail:2.9.0
links:
- loki
networks:
default: null
volumes:
- type: bind
source: /home/rovel/dev/profana/promtail-config.yaml
target: /etc/promtail/config.yml
bind:
create_host_path: true
- type: volume
source: rails-logs
target: /var/log/rails
volume: {}
rails_app:
build:
context: /home/rovel/dev/profana
dockerfile: Dockerfile
target: dev
deploy:
replicas: 2
environment:
DATABASE_URL: postgres://postgres:postgres@db:5432/profana_development
RAILS_ENV: development
labels:
app: rails_app
links:
- db
- prometheus
- promtail
- loki
networks:
default: null
volumes:
- type: volume
source: rails-logs
target: /app/log
volume: {}
redis:
image: redis:alpine
networks:
default: null
networks:
default:
name: profana_default
volumes:
caddy_data:
name: profana_caddy_data
grafana_data:
name: profana_grafana_data
postgres:
name: profana_postgres
driver: local
rails-logs:
name: profana_rails-logs