-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
90 lines (88 loc) · 2.33 KB
/
Copy pathdocker-compose.yml
File metadata and controls
90 lines (88 loc) · 2.33 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
80
81
82
83
84
85
86
87
88
89
version: '3.9'
services:
web:
build: .
container_name: telegram-crawler-web
command: sh -c "python manage.py makemigrations --noinput && python manage.py migrate --noinput && python manage.py shell -c \"from django.contrib.auth import get_user_model; User = get_user_model(); User.objects.filter(username='admin').exists() or User.objects.create_superuser('admin', 'admin@example.com', 'admin')\" && python manage.py collectstatic --noinput && gunicorn --bind 0.0.0.0:8000 telecrawl.wsgi:application"
volumes:
- .:/app
- static_volume:/app/staticfiles
ports:
- "8000:8000"
environment:
- DEBUG=True
- DB_HOST=db
- DB_NAME=telecrawl
- DB_USER=postgres
- DB_PASSWORD=postgres123
- REDIS_URL=redis://redis:6379/0
depends_on:
- db
- redis
restart: always
db:
image: postgres:15
container_name: telegram-crawler-db
environment:
POSTGRES_DB: telecrawl
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres123
volumes:
- ./postgres_data:/var/lib/postgresql/data
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
ports:
- "5432:5432"
restart: always
pgadmin:
image: dpage/pgadmin4
restart: always
environment:
PGADMIN_DEFAULT_EMAIL: admin@pentester.dad
PGADMIN_DEFAULT_PASSWORD: S4d@aZ4Ms01
ports:
- "5050:80"
depends_on:
- db
redis:
image: redis:7-alpine
container_name: telegram-crawler-redis
ports:
- "6379:6379"
restart: always
celery:
build: .
container_name: telegram-crawler-celery
command: celery -A telecrawl worker --loglevel=info
volumes:
- .:/app
environment:
- DEBUG=True
- DB_HOST=db
- DB_NAME=telecrawl
- DB_USER=postgres
- DB_PASSWORD=postgres123
- REDIS_URL=redis://redis:6379/0
depends_on:
- db
- redis
restart: always
celery-beat:
build: .
container_name: telegram-crawler-celery-beat
command: celery -A telecrawl beat --loglevel=info
volumes:
- .:/app
environment:
- DEBUG=True
- DB_HOST=db
- DB_NAME=telecrawl
- DB_USER=postgres
- DB_PASSWORD=postgres123
- REDIS_URL=redis://redis:6379/0
depends_on:
- db
- redis
restart: always
volumes:
postgres_data:
static_volume: