forked from railslove/ebicsbox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.with_db.yml
42 lines (42 loc) · 1.08 KB
/
docker-compose.with_db.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
version: "3.7"
networks:
ebicsbox_network:
services:
redis:
image: redis
restart: always
networks:
- ebicsbox_network
db:
image: postgres:9.6
restart: always
env_file: .env
environment:
- POSTGRES_DB=ebicsbox
expose:
- 5432
volumes:
- $POSTGRES_DATA_FOLDER_PATH:/var/lib/postgresql/data
networks:
- ebicsbox_network
web:
environment:
- REDIS_URL=redis://redis:6379
- DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db/ebicsbox
- PORT=5000
depends_on:
- redis
- db
command: bash -c 'while !</dev/tcp/db/5432; do sleep 10; done; bundle exec rackup -p 5000 -o 0.0.0.0'
networks:
- ebicsbox_network
worker:
environment:
- REDIS_URL=redis://redis:6379
- DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db/ebicsbox
depends_on:
- redis
- db
command: bash -c 'while !</dev/tcp/db/5432; do sleep 10; done; bundle exec sidekiq -C ./config/sidekiq.yml -r ./config/sidekiq.rb'
networks:
- ebicsbox_network