forked from web-dl-tools/api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
125 lines (119 loc) · 2.75 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
version: '3.8'
services:
postgres:
image: postgres:12.9
container_name: web-dl_postgres
deploy:
resources:
limits:
memory: 50M
reservations:
memory: 20M
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
ports:
- 5432:5432
restart: always
volumes:
- .postgres_data:/var/lib/postgresql/data
django: &base
build:
context: .
dockerfile: ./compose/django/Dockerfile
args:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_DB=${POSTGRES_DB}
command: compose/django/start.sh
container_name: web-dl_django
depends_on:
- postgres
- celery
deploy:
resources:
limits:
memory: 1000M
reservations:
memory: 500M
environment:
- DJANGO_DEBUG=${DJANGO_DEBUG}
- DJANGO_SECRET_KEY=${DJANGO_SECRET_KEY}
- SENTRY_DSN=${SENTRY_DSN}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
ports:
- 8000:8000
restart: always
user: ${USER_ID}
volumes:
- ./manage.py:/code/manage.py
- ./requirements.txt:/code/requirements.txt
- ./compose:/code/compose
- ./config:/code/config
- ./src:/code/src
- ${FILES_PATH}:/code/files
redis:
image: redis:5.0.7-alpine
container_name: web-dl_redis
deploy:
resources:
limits:
memory: 250M
reservations:
memory: 100M
restart: always
celery:
<<: *base
command: celery -A config.celery worker --concurrency=1
container_name: web-dl_celery
depends_on:
- redis
- postgres
deploy:
resources:
limits:
memory: 250M
reservations:
memory: 100M
ports: []
qbittorrent:
image: linuxserver/qbittorrent:4.3.0202003011834-6876-b519eceubuntu18.04.1-ls16
container_name: web-dl_qbittorrent
depends_on:
- django
deploy:
resources:
limits:
memory: 100M
reservations:
memory: 50M
environment:
- PUID=${USER_ID}
- TZ=Europe/Amsterdam
- WEBUI_PORT=8001
volumes:
- ${FILES_PATH}:/files
ports:
- 6881:6881
- 6881:6881/udp
- 8001:8001
restart: always
selenium:
build:
context: .
dockerfile: ./compose/selenium/Dockerfile
command: java -jar selenium.jar standalone
container_name: web-dl_selenium
depends_on:
- django
deploy:
resources:
limits:
memory: 400M
reservations:
memory: 100M
environment:
- CHROMEDRIVER_WHITELISTED_IPS=''
restart: always