-
Notifications
You must be signed in to change notification settings - Fork 18
/
docker-compose.yml
111 lines (110 loc) · 2.92 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
version: '3'
services:
db:
image: postgres:11.16@sha256:5d2aa4a7b5f9bdadeddcf87cf7f90a176737a02a30d917de4ab2e6a329bd2d45
volumes:
- ./local/initdb:/docker-entrypoint-initdb.d
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: chummy
ports:
- "5432:5432"
expose:
- "5432"
command:
- "postgres"
- "-c"
- "listen_addresses=*"
restart: always
redis:
image: redis:6.2@sha256:7919fdd5300e7abf7ae95919e6f144b37c55df16553302dbbcc7495a5aa0c079
web:
image: notification-api
restart: always
build:
context: .
dockerfile: local/Dockerfile
environment:
- REDIS_URL=redis://redis:6379/0
- SQLALCHEMY_DATABASE_URI=postgres://postgres:chummy@db:5432/notification_api
entrypoint: local/scripts/notify-web-entrypoint.sh
command: >
bash -c "make generate-version-file && make run"
volumes:
- .:/app
ports:
- "6011:6011"
depends_on:
- db
- redis
beat:
image: notification-api
restart: on-failure
build:
context: .
dockerfile: local/Dockerfile
environment:
- REDIS_URL=redis://redis:6379/0
- SQLALCHEMY_DATABASE_URI=postgres://postgres:chummy@db:5432/notification_api
entrypoint: local/scripts/notify-worker-entrypoint.sh
command: >
bash -c "sh scripts/run_celery_beat.sh"
volumes:
- .:/app
depends_on:
- db
- redis
- web
worker:
image: notification-api
restart: on-failure
build:
context: .
dockerfile: local/Dockerfile
environment:
- REDIS_URL=redis://redis:6379/0
- SQLALCHEMY_DATABASE_URI=postgres://postgres:chummy@db:5432/notification_api
entrypoint: local/scripts/notify-worker-entrypoint.sh
command: >
bash -c "[[ -f /tmp/celery.pid ]] && rm /tmp/celery.pid; sh /app/scripts/run_celery.sh"
volumes:
- .:/app
depends_on:
- db
- redis
- web
worker_sms:
image: notification-api
restart: on-failure
build:
context: .
dockerfile: local/Dockerfile
environment:
- REDIS_URL=redis://redis:6379/0
- SQLALCHEMY_DATABASE_URI=postgres://postgres:chummy@db:5432/notification_api
entrypoint: local/scripts/notify-worker-entrypoint.sh
command: >
bash -c "sh /app/scripts/run_celery_sms.sh"
volumes:
- .:/app
depends_on:
- db
- redis
- web
tests:
image: notification-api-tests
restart: "no"
build:
context: .
dockerfile: ci/Dockerfile.test
environment:
- REDIS_URL=redis://redis:6379/1
- SQLALCHEMY_DATABASE_URI=postgres://postgres:chummy@db:5432/test_notification_api
- SQLALCHEMY_DATABASE_READER_URI=postgres://reader:chummy@db:5432/test_notification_api
entrypoint: local/scripts/notify-worker-entrypoint.sh
command: >
bash -c "/app/scripts/run_tests.sh"
volumes:
- .:/app
depends_on:
- db