-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
59 lines (55 loc) · 1.41 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
version: "3.8"
services:
rayanesh_postgres:
container_name: rayanesh_postgres
image: postgres
restart: always
ports:
- "5432:5432"
volumes:
- ./volumes/postgres_volume/:/var/lib/postgresql/data/
environment:
- POSTGRES_DB=db_name
- POSTGRES_USER=db_user
- POSTGRES_PASSWORD=db_password
rayanesh_redis:
container_name: rayanesh_redis
image: redis
restart: always
ports:
- "6379:6379"
volumes:
- ./volumes/redis_volume/:/data/
rayanesh:
container_name: rayanesh
build: .
restart: always
command: >
bash -c "python manage.py makemigrations &&
python manage.py migrate &&
python manage.py runserver 0.0.0.0:8000"
volumes:
- .:/rayanesh
ports:
- 8000:8000
environment:
- POSTGRES_DB=db_name
- POSTGRES_USER=db_user
- POSTGRES_PASSWORD=db_password
depends_on:
- rayanesh_redis
- rayanesh_postgres
rayanesh_worker:
container_name: rayanesh_worker
build: .
restart: always
depends_on:
- rayanesh_redis
- rayanesh
command: bash -c "python manage.py makemigrations &&
python manage.py migrate &&
celery -A RayaneshBackend worker -l INFO"
volumes:
- ./volumes/cxc_worker/:/home/hossein/
environment:
- CELERY_BROKER=redis://rayanesh_redis:6379/0