forked from RedmanPlus/Devseye
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
73 lines (67 loc) · 1.65 KB
/
docker-compose.yml
File metadata and controls
73 lines (67 loc) · 1.65 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
version: '3.7'
services:
db:
image: postgres:12.0-alpine
volumes:
- postgres_data:/var/lib/postgresql/data/
environment:
# https://www.postgresql.org/docs/current/libpq-envars.html, подгружаются из .env
- POSTGRES_USER=$DB_USER
- POSTGRES_PASSWORD=$DB_PASSWORD
- POSTGRES_DB=$DB_NAME
env_file:
- ./.env
django:
build: ./
command: [sh, -c, "cd django &&
python manage.py makemigrations &&
python manage.py migrate &&
python manage.py runserver 0.0.0.0:8000"]
ports:
- $DJANGO_PORT:$DJANGO_PORT
env_file:
- ./.env
depends_on:
- db
parser:
build: ./
command: [sh, -c, "cd parser &&
python post_prev_vacancies.py &&
python live_parser.py"]
restart: on-failure
env_file:
- ./.env
depends_on:
- django
react:
build:
context: ./frontend/
env_file:
- ./.env
volumes:
- react_build:/PYTHON_JOB_WEBSITE/build
depends_on:
- django
nginx:
build:
context: ./nginx
ports:
- 80:80
- 443:443
volumes:
- react_build:/var/www/react
- etc-letsencrypt:/etc/letsencrypt
depends_on:
- react
certbot:
image: certbot/certbot
depends_on:
- nginx
volumes:
- etc-letsencrypt:/etc/letsencrypt
- react_build:/var/www/react
command: certonly --webroot --webroot-path=/var/www/react --email arseny.chebyshev@gmail.com --agree-tos --no-eff-email -d devseye.ru
volumes:
postgres_data:
react_build:
etc-letsencrypt: