forked from openfoodfoundation/openfoodnetwork
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
40 lines (38 loc) · 1016 Bytes
/
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
version: '3'
services:
db:
image: postgres:9.5
restart: always
environment:
POSTGRES_PASSWORD: f00d
POSTGRES_USER: ofn
POSTGRES_DB: open_food_network_dev
volumes:
- 'postgres:/var/lib/postgresql/data'
web:
tty: true
stdin_open: true
build: .
ports:
- 3000:3000
volumes:
- .:/usr/src/app
- gems:/bundles
- ./config/database.yml:/usr/src/app/config/database.yml
- ./config/application.yml.example:/usr/src/app/config/application.yml
depends_on:
- db
environment:
ADMIN_EMAIL: [email protected]
ADMIN_PASSWORD: ofn123
OFN_DB_HOST: db
command: >
bash -c "(bundle check || bundle install) &&
wait-for-it -t 30 db:5432 &&
bundle exec rake db:reset &&
bundle exec rake db:test:prepare ofn:sample_data || true &&
rm -f tmp/pids/server.pid &&
bundle exec rails s -p 3000 -b '0.0.0.0'"
volumes:
gems:
postgres: