-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
88 lines (81 loc) · 2.2 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
version: '3.8'
services:
postgres:
image: postgres:13
restart: always
volumes:
- postgres_data:/var/lib/postgresql/data/
environment:
POSTGRES_DB: postgres
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- "5432:5432"
redis:
image: redis:6.2
restart: always
ports:
- "6379:6379"
p2p:
container_name: ptp
image: ghcr.io/pharmbio/ptp:latest
build:
context: ./ptp/
dockerfile: Dockerfile
command: sh -c /app/run.sh
#command: >
# sh -c "python manage.py migrate &&
# python manage.py collectstatic --noinput &&
# python manage.py runserver 0.0.0.0:8000"
#gunicorn p2p.wsgi:application --bind 0.0.0.0:8000"
volumes:
- ./ptp/:/app # Mount the current directory to the container for live development
ports:
- "8000:8000"
depends_on:
- postgres
- redis
environment:
- DATABASE_URL=postgres://postgres:postgres@postgres:5432/postgres
- REDIS_URL=redis://redis:6379/0
- CELERY_BROKER_URL=redis://redis:6379/0
- DEBUG="True"
- EMAIL_HOST=smtp.your-email-provider.com
- EMAIL_PORT="587"
- EMAIL_USE_TLS="True"
- EMAIL_HOST_PASSWORD=your-email-password
- SITE_URL=http://localhost:8000
p2p-worker:
container_name: worker
build:
context: ./ptp/
command: celery -A ptp.celery worker --loglevel=info --concurrency=8
volumes:
- ./ptp/:/app
#- ./tmp:/tmp
depends_on:
- redis
- postgres
environment:
- GET_HOSTS_FROM=dns
- DATABASE_URL=postgres://postgres:postgres@postgres:5432/postgres
- REDIS_URL=redis://redis:6379/0
- CELERY_BROKER_URL=redis://redis:6379/0
p2p-beat:
container_name: beat
build:
context: ./ptp/
command: celery -A p2p.celery beat --loglevel=info
volumes:
- ./ptp/:/app
depends_on:
- redis
- postgres
environment:
- GET_HOSTS_FROM=dns
- DATABASE_URL=postgres://postgres:postgres@postgres:5432/postgres
- REDIS_URL=redis://redis:6379/0
- CELERY_BROKER_URL=redis://redis:6379/0
volumes:
postgres_data: