-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
162 lines (152 loc) · 3.47 KB
/
docker-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
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
150
151
152
153
154
155
156
157
158
159
160
161
162
---
x-bops: &bops
image: bops/ruby
build: docker/ruby
working_dir: /home/rails/bops
init: true
stdin_open: true
tty: true
restart: always
depends_on:
- db
- dnsmasq
- redis
dns:
- 172.23.9.53
environment:
DATABASE_URL: postgres://postgres:postgres@db:5432
GROVER_NO_SANDBOX: "true"
PIDFILE: /tmp/pids/server.pid
OS_VECTOR_TILES_API_KEY: ${OS_VECTOR_TILES_API_KEY}
REDIS_URL: redis://redis:6379/1
PUPPETEER_EXECUTABLE_PATH: /usr/bin/chromium
NOTIFY_API_KEY: ${NOTIFY_API_KEY}
NOTIFY_LETTER_API_KEY: ${NOTIFY_LETTER_API_KEY}
RAILS_DISABLE_DEPRECATED_TO_S_CONVERSION: "true"
volumes:
- type: bind
source: .
target: /home/rails/bops
- type: volume
source: bundle
target: /home/rails/bundle
- type: volume
source: node_modules
target: /home/rails/bops/node_modules
- type: tmpfs
target: /tmp/pids
tmpfs:
mode: 0777
x-applicants: &applicants
image: bops/applicants
build: bops-applicants/docker/ruby
working_dir: /home/rails/bops-applicants
init: true
stdin_open: true
tty: true
restart: always
depends_on:
- web
dns:
- 172.23.9.53
environment:
API_BEARER: 123
API_HOST: bops.localhost:3000
API_USER: api_user
PIDFILE: /tmp/pids/server.pid
PORT: 3001
PROTOCOL: http
OS_VECTOR_TILES_API_KEY: ${OS_VECTOR_TILES_API_KEY}
DATABASE_URL: postgres://postgres:postgres@db:5432
volumes:
- type: bind
source: bops-applicants
target: /home/rails/bops-applicants
- type: volume
source: applicants_bundle
target: /home/rails/bundle
- type: volume
source: applicants_node_modules
target: /home/rails/bops-applicants/node_modules
- type: tmpfs
target: /tmp/pids
tmpfs:
mode: 0777
services:
dnsmasq:
image: bops/dnsmasq
build: docker/dnsmasq
volumes:
- type: bind
source: docker/dnsmasq/dnsmasq.conf
target: /etc/dnsmasq.conf
cap_add:
- NET_ADMIN
networks:
default:
ipv4_address: 172.23.9.53
db:
image: bops/postgis
build: docker/postgis
command: >
-c ssl=on
-c ssl_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
-c ssl_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
volumes:
- type: volume
source: db
target: /var/lib/postgresql/data
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- "127.0.0.1:5432:5432"
redis:
image: redis:7.0
command: ["redis-server", "--save '60 1'", "--loglevel warning"]
ports:
- "127.0.0.1:6379:6379"
volumes:
- type: volume
source: redis
target: /data
web:
<<: *bops
command: ["foreman", "start", "-f", "Procfile.dev"]
ports:
- "127.0.0.1:3000:3000"
networks:
default:
ipv4_address: 172.23.9.30
console:
<<: *bops
command: ["/bin/bash"]
profiles:
- console
applicants:
<<: *applicants
command: ["foreman", "start", "-f", "Procfile.dev"]
ports:
- "127.0.0.1:3001:3001"
networks:
default:
ipv4_address: 172.23.9.31
aconsole:
<<: *applicants
command: ["/bin/bash"]
profiles:
- console
networks:
default:
ipam:
config:
- subnet: 172.23.0.0/16
ip_range: 172.23.9.0/24
gateway: 172.23.9.254
volumes:
redis:
db:
bundle:
node_modules:
applicants_bundle:
applicants_node_modules: