-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
79 lines (73 loc) · 1.77 KB
/
Copy pathdocker-compose.yml
File metadata and controls
79 lines (73 loc) · 1.77 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
70
71
72
73
74
75
76
77
78
79
version: '3.8'
services:
postgres:
image: postgres:13.1
container_name: postgres
hostname: postgres
restart: always
environment:
- POSTGRES_USER=test
- POSTGRES_PASSWORD=test
- POSTGRES_NAME=postgres
- TZ=Asia/Tehran
volumes:
- posgres_data:/var/lib/postgresql/data
logging:
driver: "json-file"
options:
max-size: "1024m"
redis:
image: redis:6.0.9-alpine3.12
container_name: redis
hostname: redis
restart: always
volumes:
- redis_data:/data
- /etc/localtime:/etc/localtime:ro
logging:
driver: "json-file"
options:
max-size: "1024m"
python:
image: feeder/python:3.7.10
restart: always
container_name: python
hostname: python
command: bash -c 'python manage.py migrate && python3 manage.py collectstatic --noinput && python3 manage.py runserver 0.0.0.0:8000 && celery -A feeder worker -E -l info -f logging/celery.logs'
depends_on:
- redis
- postgres
- rabbitmq
volumes:
- python_static:/feeder/static
- python_logs:/feeder/logging
- python_media:/feeder/media
- /etc/localtime:/etc/localtime:ro
ports:
- "8000:8000"
logging:
driver: "json-file"
options:
max-size: "1024m"
rabbitmq:
image: rabbitmq:3-management
container_name: rabbitmq
hostname: rabbitmq
restart: unless-stopped
environment:
- 'RABBITMQ_DEFAULT_USER=test'
- 'RABBITMQ_DEFAULT_PASS=test'
volumes:
- rabbit_data:/var/lib/rabbitmq
- /etc/localtime:/etc/localtime:ro
logging:
driver: "json-file"
options:
max-size: "1024m"
volumes:
python_static:
python_media:
posgres_data:
redis_data:
rabbit_data:
python_logs: