-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
58 lines (54 loc) · 1.18 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
---
version: '3'
services:
app:
depends_on:
- rabbitmq
build:
context: .
volumes:
- .:/source
environment: &app-env
- DEBUG
- DATABASES_DEFAULT_HOST
- DATABASES_DEFAULT_USER
- DATABASES_DEFAULT_PASSWORD
- DATABASES_DEFAULT_NAME
- STATIC_URL
- STATICFILES_STORAGE
- RABBITMQ_URL
- CELERY_BROKER_URL
ports:
- 8000:8000
command:
- /bin/bash
- -c
- pip install poetry
&& poetry config virtualenvs.create false
&& poetry install --only main
&& python manage.py migrate
&& python manage.py runserver 0.0.0.0:8000
worker:
build:
context: .
depends_on:
- app
image: vector-ml-app:latest
volumes:
- .:/source
environment: *app-env
command:
- /bin/bash
- -c
- pip install poetry
&& poetry config virtualenvs.create false
&& poetry install --only main
&& celery -A core worker -l INFO
rabbitmq:
image: rabbitmq:3.10-management-alpine
environment:
RABBITMQ_DEFAULT_USER: admin
RABBITMQ_DEFAULT_PASS: admin
ports:
- 5672:5672
- 15672:15672