-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
52 lines (47 loc) · 1.35 KB
/
docker-compose.prod.yml
File metadata and controls
52 lines (47 loc) · 1.35 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
version: '3.8'
services:
web:
build: .
ports:
- "8000:8000"
environment:
- DATABASE_URL=postgresql://appointment_user:${DB_PASSWORD}@db:5432/appointment_manager
- REDIS_URL=redis://redis:6379/0
- TWILIO_ACCOUNT_SID=${TWILIO_ACCOUNT_SID}
- TWILIO_AUTH_TOKEN=${TWILIO_AUTH_TOKEN}
- TWILIO_WHATSAPP_FROM=${TWILIO_WHATSAPP_FROM}
- TIMEZONE_DEFAULT=${TIMEZONE_DEFAULT:-America/New_York}
- DEBUG=False
depends_on:
- db
- redis
restart: unless-stopped
worker:
build: .
command: python worker.py
environment:
- DATABASE_URL=postgresql://appointment_user:${DB_PASSWORD}@db:5432/appointment_manager
- REDIS_URL=redis://redis:6379/0
- TWILIO_ACCOUNT_SID=${TWILIO_ACCOUNT_SID}
- TWILIO_AUTH_TOKEN=${TWILIO_AUTH_TOKEN}
- TWILIO_WHATSAPP_FROM=${TWILIO_WHATSAPP_FROM}
- TIMEZONE_DEFAULT=${TIMEZONE_DEFAULT:-America/New_York}
- DEBUG=False
depends_on:
- db
- redis
restart: unless-stopped
db:
image: postgres:15
environment:
- POSTGRES_DB=appointment_manager
- POSTGRES_USER=appointment_user
- POSTGRES_PASSWORD=${DB_PASSWORD}
volumes:
- postgres_data:/var/lib/postgresql/data
restart: unless-stopped
redis:
image: redis:7-alpine
restart: unless-stopped
volumes:
postgres_data: