-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
49 lines (46 loc) · 1.1 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
version: '3'
services:
web-app:
build: .
container_name: web-app
hostname: web-app
environment:
- PYTHONUNBUFFERED=1
- DJANGO_SETTINGS_MODULE=education_platform_for_pythoneers.settings_docker
entrypoint: [ "/bin/sh","-c" ]
links:
- selenium
command:
- |
python manage.py makemigrations
python manage.py migrate && python manage.py migrate --run-syncdb
python setup_docker.py
python manage.py runserver 0.0.0.0:8000
ports:
- "8000:8000"
depends_on:
db:
condition: service_healthy
db:
image: postgres:12.5
container_name: db
hostname: db
environment:
- POSTGRES_DB=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
ports:
- "5432:5432"
volumes:
- ./data/db:/var/lib/postgresql/data
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 5s
timeout: 30s
retries: 6
restart: always
selenium:
image: selenium/standalone-chrome-debug:3.7.1
ports:
- "4444:4444"
restart: always