forked from DFE-Digital/teaching-vacancies
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
65 lines (60 loc) · 1.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
version: '3.1'
services:
web:
build:
context: .
args:
RAILS_ENV: "development"
ports: ["3000:3000"]
environment:
RAILS_ENV: "development"
env_file:
- docker-compose.env
depends_on:
- db
- elasticsearch
- redis
- sidekiq
tty: true
stdin_open: true
restart: on-failure
volumes:
- .:/srv/dfe-tvs:cached
- node_modules:/srv/dfe-tvs/node_modules
command: bash -c "rm -f tmp/pids/server.pid && rails s -b 'ssl://web:3000?key=config/localhost/https/local.key&cert=config/localhost/https/local.crt'"
db:
image: postgres
volumes:
- pg_data:/var/lib/postgresql/data/:cached
restart: on-failure
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:6.0.1
hostname: "{{.Node.Hostname}}-elasticsearch"
depends_on:
- db
ports:
- "9200:9200"
environment:
- discovery.type=single-node
- cluster.name=docker-dev-cluster
- node.name={{.Node.Hostname}}-elasticsearch
- network.host=0.0.0.0
volumes:
- elasticsearch:/usr/share/elasticsearch/teaching_jobs_dev/data
restart: on-failure
redis:
image: redis:latest
command: redis-server
restart: on-failure
sidekiq:
build: .
env_file:
- docker-compose.env
command: bundle exec sidekiq -C config/sidekiq.yml
depends_on:
- redis
restart: on-failure
volumes:
pg_data: {}
elasticsearch: {}
node_modules: