-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
48 lines (45 loc) · 1.23 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
services:
webapp:
stdin_open: true
tty: true
build:
context: .
ports:
- '3000:3000'
environment:
- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
- RAILS_ENV=development
volumes:
- .:/app
depends_on:
- postgres
- elasticsearch
command: >
bash -c "
RAILS_ENV=test bundle exec rake db:set_up_for_local;
RAILS_ENV=development bundle exec rake db:set_up_for_local;
RAILS_ENV=development bundle exec rake elasticsearch:delete_teacherset_index;
RAILS_ENV=development bundle exec rake elasticsearch:create_teacherset_index;
RAILS_ENV=development bundle exec rake seeds:teacher_sets;
bundle exec rails server -b 0.0.0.0
"
postgres:
image: postgres:13
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
volumes:
- './data/postgres-my-library-nyc-app:/var/lib/postgresql/data'
ports:
- '5432:5432'
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.10.0
environment:
- discovery.type=single-node
ports:
- '9200:9200'
volumes:
- 'esdata:/usr/share/elasticsearch/data'
volumes:
esdata: