-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
63 lines (61 loc) · 1.29 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
58
59
60
61
62
63
version: "3.7"
services:
db:
build:
context: .
dockerfile: pg-Dockerfile
ports:
- 5432:5432
volumes:
- data-volume:/var/lib/postgresql/data
env_file:
- .env
redis:
image: "redis:alpine"
ports:
- "6379:6379"
volumes:
- ${PWD}/redis-data:/var/lib/redis
- ${PWD}/redis.conf:/usr/local/etc/redis/redis.conf
command: redis-server
web-app:
depends_on:
- db
build:
context: .
dockerfile: Dockerfile
args:
- PROJECT_DIR=${PROJECT_DIR}
ports:
- 8000:8000
volumes:
- ./:${PROJECT_DIR}
env_file:
- .env
command: /bin/sh -c "chmod +x ${PROJECT_DIR}/entrypoint-webapp.sh &&
${PROJECT_DIR}/entrypoint-webapp.sh"
celery:
build:
context: .
dockerfile: Dockerfile
command: /bin/sh -c "cd ${PROJECT_DIR} && celery -A hoker_newz worker --loglevel=DEBUG"
env_file:
- .env
volumes:
- ./:${PROJECT_DIR}
depends_on:
- db
- redis
celery-beat:
build: .
command: /bin/sh -c "cd ${PROJECT_DIR} && celery -A hoker_newz beat --loglevel=DEBUG"
env_file:
- .env
volumes:
- ./:${PROJECT_DIR}
depends_on:
- db
- redis
volumes:
data-volume:
redis-data: