Repository navigation
Expand file tree
/
Copy pathcompose.yml
More file actions
69 lines (65 loc) · 1.91 KB
/
Copy pathcompose.yml
File metadata and controls
69 lines (65 loc) · 1.91 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
services:
redis:
image: redis:7.4.0
container_name: redis
networks:
- chap-network
chap:
depends_on:
- redis
- worker
container_name: chap
build: .
environment:
- GOOGLE_SERVICE_ACCOUNT_EMAIL=${GOOGLE_SERVICE_ACCOUNT_EMAIL}
- GOOGLE_SERVICE_ACCOUNT_PRIVATE_KEY=${GOOGLE_SERVICE_ACCOUNT_PRIVATE_KEY}
- REDIS_HOST=redis
- REDIS_PORT=6379
- CHAP_DATABASE_URL=postgresql://root:thisisnotgoingtobeexposed@postgres:5432/chap_core
- CELERY_BROKER=redis://redis:6379/0
- IS_IN_DOCKER=1
ports:
- "8000:8000"
expose:
- "8000"
command: /app/.venv/bin/chap serve
working_dir: /
networks:
- chap-network
volumes:
- ./logs:/app/logs
worker:
container_name: worker
build:
context: .
dockerfile: Dockerfile.inla
environment:
- GOOGLE_SERVICE_ACCOUNT_EMAIL=${GOOGLE_SERVICE_ACCOUNT_EMAIL}
- GOOGLE_SERVICE_ACCOUNT_PRIVATE_KEY=${GOOGLE_SERVICE_ACCOUNT_PRIVATE_KEY}
- IS_IN_DOCKER=1
- CHAP_DATABASE_URL=postgresql://root:thisisnotgoingtobeexposed@postgres:5432/chap_core
- CELERY_BROKER=redis://redis:6379
- C_FORCE_ROOT=1 #TODO: Remove this when we have a proper user
# sh -c to get logging as part of the command to work
command: '/app/.venv/bin/celery -A chap_core.rest_api_src.celery_tasks worker --loglevel=info'
# 'sh -c "/app/.venv/bin/rq worker --url redis://redis:6379/0 > /app/logs/worker.log 2>&1"'
networks:
- chap-network
volumes:
- ./logs:/app/logs
postgres:
image: postgres
restart: always
environment:
POSTGRES_USER: root
POSTGRES_PASSWORD: thisisnotgoingtobeexposed
POSTGRES_DB: chap_core
volumes:
- /var/lib/postgresql/chap_data:/var/lib/postgresql/data
expose:
- "5432"
networks:
- chap-network
networks:
chap-network:
driver: bridge