-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
executable file
·80 lines (73 loc) · 1.81 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
version: '3.8'
services:
db:
image: postgres:15-alpine
ports:
- "5434:5432"
environment:
POSTGRES_DB: "${POSTGRES_DB}"
POSTGRES_USER: "${POSTGRES_USER}"
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
volumes:
- database:/var/lib/postgresql/data
pgadmin:
image: dpage/pgadmin4
ports:
- "8080:80"
environment:
PGADMIN_DEFAULT_EMAIL: "${PGADMIN_DEFAULT_EMAIL}"
PGADMIN_DEFAULT_PASSWORD: "${PGADMIN_DEFAULT_PASSWORD}"
depends_on:
- db
django:
build: .
command: >
sh -c "env
python manage.py migrate &&
python manage.py collectstatic --noinput &&
python manage.py runserver 0.0.0.0:8000"
volumes:
- .:/var/www/server
- user_data:/var/www/Plasmodocking
ports:
- "8000:8000"
environment:
POSTGRES_DB: "${POSTGRES_DB}"
POSTGRES_USER: "${POSTGRES_USER}"
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
depends_on:
- db
rabbitmq:
image: rabbitmq:3-management
ports:
- "15672:15672" # Web interface
- "5672:5672"
volumes:
- rabbitmq_data:/var/lib/rabbitmq
environment:
RABBITMQ_DEFAULT_USER: "${RABBITMQ_DEFAULT_USER}"
RABBITMQ_DEFAULT_PASS: "${RABBITMQ_DEFAULT_PASS}"
celery:
build:
context: .
dockerfile: Dockerfile.worker
volumes:
- .:/var/www/server
- user_data:/var/www/Plasmodocking
depends_on:
- django
- rabbitmq
environment:
- DJANGO_SETTINGS_MODULE=djangoAPI.settings
- NVIDIA_VISIBLE_DEVICES=all
command: >
sh -c "celery -A djangoAPI worker --loglevel=info" --concurrency=1
deploy:
resources:
reservations:
devices:
- capabilities: ["gpu"]
volumes:
database:
rabbitmq_data:
user_data: