-
-
Notifications
You must be signed in to change notification settings - Fork 724
/
docker-compose.yml
76 lines (75 loc) · 1.76 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
version: '3'
services:
db:
image: postgres:10.19
restart: always
environment:
POSTGRES_PASSWORD: f00d
POSTGRES_USER: ofn
POSTGRES_DB: open_food_network_dev
ports:
- 5432:5432
volumes:
- 'postgres:/var/lib/postgresql/data'
redis:
image: redis
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
depends_on:
- db
- redis
- webpack
environment:
OFN_DB_HOST: db
OFN_REDIS_URL: redis://redis/
OFN_REDIS_JOBS_URL: redis://redis
WEBPACKER_DEV_SERVER_HOST: webpack
command: >
bash -c "wait-for-it -t 30 db:5432 &&
rm -f tmp/pids/server.pid &&
(bundle check || bundle install) &&
bundle exec rake db:create &&
yarn install &&
bundle exec rails s -p 3000 -b '0.0.0.0'"
webpack:
build: .
command: ./bin/webpack-dev-server
volumes:
- .:/usr/src/app
- gems:/bundles
ports:
- '3035:3035'
environment:
NODE_ENV: development
RAILS_ENV: development
WEBPACKER_DEV_SERVER_HOST: 0.0.0.0
worker:
tty: true
stdin_open: true
build: .
volumes:
- .:/usr/src/app
- gems:/bundles
- ./config/database.yml:/usr/src/app/config/database.yml
depends_on:
- db
- redis
environment:
OFN_DB_HOST: db
OFN_REDIS_URL: redis://redis
OFN_REDIS_JOBS_URL: redis://redis
command: >
bash -c "wait-for-it -t 30 db:5432 &&
(bundle check || bundle install) &&
bundle exec sidekiq -q mailers -q default"
volumes:
gems:
postgres: