-
Notifications
You must be signed in to change notification settings - Fork 10
/
docker-compose.with_db.yml
92 lines (92 loc) · 2.2 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
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
version: "3.7"
networks:
ebicsbox_network:
services:
redis:
image: redis
restart: always
networks:
- ebicsbox_network
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
db:
image: postgres
restart: always
# set shared memory limit when using docker-compose
shm_size: 128mb
environment:
- POSTGRES_DB=ebicsbox
- POSTGRES_USER=ebicsbox
- POSTGRES_PASSWORD=password
networks:
- ebicsbox_network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $POSTGRES_USER"]
interval: 10s
timeout: 5s
retries: 5
db_test:
image: postgres
restart: always
# set shared memory limit when using docker-compose
shm_size: 128mb
environment:
- POSTGRES_DB=ebicsbox_test
- POSTGRES_USER=ebicsbox_test
- POSTGRES_PASSWORD=password
networks:
- ebicsbox_network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $POSTGRES_USER"]
interval: 10s
timeout: 5s
retries: 5
web:
environment:
- AUTH_SERVICE=static
- DATABASE_URL=postgresql://ebicsbox:password@db/ebicsbox
- PASSPHRASE=some_passphrase
- PORT=5000
- REDIS_URL=redis://redis:6379
- TEST_DATABASE_URL=postgresql://ebicsbox_test:password@db_test/ebicsbox_test
depends_on:
db:
condition: service_healthy
db_test:
condition: service_healthy
redis:
condition: service_healthy
ports:
- 5000:5000
command: bin/start server
networks:
- ebicsbox_network
build: .
healthcheck:
test: ["CMD", bin/healthchecks/server]
interval: 10s
timeout: 5s
retries: 5
worker:
build: .
healthcheck:
test: ["CMD", bin/healthchecks/worker]
interval: 10s
timeout: 5s
retries: 5
environment:
- AUTH_SERVICE=static
- DATABASE_URL=postgresql://ebicsbox:password@db/ebicsbox
- PASSPHRASE=some_passphrase
- REDIS_URL=redis://redis:6379
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
command: bin/start worker
networks:
- ebicsbox_network