-
Notifications
You must be signed in to change notification settings - Fork 18
/
docker-compose.yml
57 lines (56 loc) · 1.86 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
# base docker-compose.yml
# use with docker-compose.override.yml for development
# docker-compose up -d
#
# or with docker-compose.prod.yml for production
# docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d
#
version: "3.2"
services:
opentpod-db:
container_name: opentpod-db
image: postgres:12.0-alpine
restart: always
volumes:
- opentpod-db-data:/var/lib/postgresql/data
environment:
POSTGRES_USER: root
POSTGRES_DB: opentpod
POSTGRES_PASSWORD: ${OPENTPOD_DB_PASSWORD}
opentpod-redis:
container_name: opentpod-redis
image: redis:4.0.5-alpine
command: --appendonly yes --requirepass "${OPENTPOD_REDIS_PASSWORD}"
restart: always
volumes:
- opentpod-redis-data:/data
opentpod: &opentpod-djangoapp
container_name: opentpod
image: opentpod:stable
volumes:
- opentpod-data-var:/root/openTPOD/var
environment:
- DJANGO_ALLOWED_HOSTS
- DJANGO_SECRET_KEY
- DJANGO_DEBUG=false
- PYTHONDONTWRITEBYTECODE=1
- OPENTPOD_REDIS_PASSWORD
- REDIS_URL=redis://:${OPENTPOD_REDIS_PASSWORD}@opentpod-redis:6379/0
- CACHE_URL=redis://:${OPENTPOD_REDIS_PASSWORD}@opentpod-redis:6379/1
- DATABASE_URL=postgres://root:${OPENTPOD_DB_PASSWORD}@opentpod-db:5432/opentpod
depends_on:
- opentpod-db
- opentpod-redis
opentpod-worker:
<<: *opentpod-djangoapp
container_name: opentpod-worker
opentpod-trainer:
<<: *opentpod-djangoapp
container_name: opentpod-trainer
opentpod-rqscheduler:
<<: *opentpod-djangoapp
container_name: opentpod-rqscheduler
volumes:
opentpod-data-var:
opentpod-db-data:
opentpod-redis-data: