-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
55 lines (49 loc) · 1.44 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
version: '3'
services:
api:
build: .
depends_on:
- db
- redis
- worker
command: gunicorn --bind 0.0.0.0:8000 --reload "src:create_app()"
ports:
- "8000:8000"
links:
- db:db
- redis:redis
environment:
- DATABASE_URL=postgresql://${DB_USER}:${DB_PASSWORD}@db/${DB_DATABASE}
- REDIS_URL=redis://redis
- TWITTER_BEARER_TOKEN=${TWITTER_BEARER_TOKEN}
- GOOGLE_SERVICE_ACCOUNT=${GOOGLE_SERVICE_ACCOUNT}
volumes:
- .:/readlater
db:
image: postgres:13-alpine
ports:
- "5432:5432"
environment:
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_DB=${DB_DATABASE}
redis:
image: redis:latest
ports:
- "6379:6379"
worker:
build: .
depends_on:
- "db"
- "redis"
links:
- redis:redis
environment:
- DATABASE_URL=postgresql://${DB_USER}:${DB_PASSWORD}@db/${DB_DATABASE}
- BROKER_URL=redis://redis/0
- GOOGLE_SERVICE_ACCOUNT=${GOOGLE_SERVICE_ACCOUNT}
- GOOGLE_APPLICATION_CREDENTIALS=${GOOGLE_APPLICATION_CREDENTIALS}
command:
celery -A celery_worker.celery worker
volumes:
- .:/readlater