-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
117 lines (115 loc) · 3.09 KB
/
docker-compose.yml
File metadata and controls
117 lines (115 loc) · 3.09 KB
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
112
113
114
115
116
117
services:
admin:
build:
context: ./notifications-admin
args:
- GIT_COMMIT=local
container_name: notify-admin
depends_on:
api:
condition: service_healthy
env_file:
- .env.local
environment:
- WERKZEUG_DEBUG_PIN=off
- API_HOST_NAME=http://api:6011
- REDIS_URL=redis://redis:6379/0
- NOTIFY_ENVIRONMENT=development
- SECRET_KEY=dev-notify-secret-key
- DANGEROUS_SALT=dev-notify-salt
- NOTIFY_E2E_TEST_URI=http://admin:6012/
- CSV_BUCKET_NAME=flexion-notify-api-csv-upload-bucket-dev
- CSV_AWS_REGION=us-east-1
ports:
- "127.0.0.1:6012:6012"
networks:
- notify-network
restart: unless-stopped
api:
build:
context: ./notifications-api
args:
- GIT_COMMIT=local
container_name: notify-api
volumes:
- ./docker/postgres/init-databases.sql:/app/init-databases.sql:ro
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:6011/_status?simple=1" ]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
environment:
- ADMIN_BASE_URL=http://admin:6012
- DATABASE_URL=postgresql://postgres:postgres@db:5432/notification_api
- SQLALCHEMY_DATABASE_TEST_URI=postgresql://postgres:postgres@db:5432/test_notification_api
- PGPASSWORD=postgres
- PGUSER=postgres
- PGHOST=db
- REDIS_URL=redis://redis:6379
- NOTIFY_INTERNATIONAL_SMS_SENDER=+18885551234
- NOTIFY_ENVIRONMENT=development
- NOTIFY_LOG_PATH=/dev/null
- API_HOST_NAME=http://api:6011
- SECRET_KEY=dev-notify-secret-key
- DANGEROUS_SALT=dev-notify-salt
- ANTIVIRUS_ENABLED=0
- REDIS_ENABLED=1
- SES_STUB_URL=None
- FLASK_DEBUG=true
- WERKZEUG_DEBUG_PIN=off
- DEBUG=True
- AWS_US_TOLL_FREE_NUMBER=+18556438890
- CSV_BUCKET_NAME=flexion-notify-api-csv-upload-bucket-dev
- CSV_AWS_REGION=us-east-1
- SNS_AWS_REGION=us-east-1
env_file:
- .env.local
ports:
- "127.0.0.1:6011:6011"
networks:
- notify-network
restart: unless-stopped
db:
image: postgres:15-bullseye
container_name: notify-db
ports:
- "127.0.0.1:5432:5432"
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
volumes:
- postgres_data:/var/lib/postgresql/data
- ./docker/postgres/init-databases.sql:/docker-entrypoint-initdb.d/init-databases.sql
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 5s
timeout: 2s
retries: 3
networks:
- notify-network
redis:
image: redis:6.2
container_name: notify-redis
ports:
- "127.0.0.1:6379:6379"
volumes:
- redis_data:/data
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
interval: 5s
timeout: 3s
retries: 5
networks:
- notify-network
networks:
notify-network:
driver: bridge
volumes:
postgres_data:
redis_data: