-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
67 lines (63 loc) · 1.61 KB
/
docker-compose.yml
File metadata and controls
67 lines (63 loc) · 1.61 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
version: "3"
services:
postgres:
image: postgres:11
ports:
- "5432:5432"
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
volumes:
- psgl:/var/lib/postgresql/data/
nginx:
container_name: nginx
build: ./nginx
ports:
- 80:80
volumes:
- static:/static
depends_on:
- django
django:
build:
context: ./app
dockerfile: Dockerfile
ports:
- 8000:8000
command: bash -c "pipenv run gunicorn settings.wsgi:application -b 0.0.0.0:8000"
environment:
- DEBUG=1
- DATABASE_ENGINE=django.db.backends.postgresql
- DATABASE_DB=${POSTGRES_DB}
- DATABASE_USER=${POSTGRES_USER}
- DATABASE_PASSWORD=${POSTGRES_PASSWORD}
- DATABASE_HOST=postgres
- DATABASE_PORT=5432
env_file:
- .env
volumes:
- static:/static
depends_on:
- dbtool
dbtool:
build:
context: ./app
dockerfile: Dockerfile
command: bash -c "pipenv run python manage.py makemigrations realestate &&
pipenv run python manage.py migrate &&
pipenv run python realestate/parser_suumo.py &&
pipenv run python realestate/prediction.py"
environment:
- DEBUG=1
- DATABASE_ENGINE=django.db.backends.postgresql
- DATABASE_DB=${POSTGRES_DB}
- DATABASE_USER=${POSTGRES_USER}
- DATABASE_PASSWORD=${POSTGRES_PASSWORD}
- DATABASE_HOST=postgres
- DATABASE_PORT=5432
depends_on:
- postgres
volumes:
psgl:
static: