forked from DigitalCampus/django-oppia
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
42 lines (40 loc) · 923 Bytes
/
docker-compose.yml
File metadata and controls
42 lines (40 loc) · 923 Bytes
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
services:
web:
build: .
command: python manage.py runserver 0.0.0.0:8000
ports:
- "${DJANGO_PORT:-8000}:8000"
volumes:
- .:/code
- ../static:/static
- ../media:/media
- ../upload:/upload
depends_on:
db:
condition: service_healthy
db:
image: mysql:8.0
ports:
- "${DB_PORT:-3306}:${DB_PORT:-3306}"
volumes:
- data:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD_FILE: /run/secrets/db_root_password
MYSQL_DATABASE: oppia
MYSQL_USER: oppiauser
MYSQL_PASSWORD_FILE: /run/secrets/db_password
secrets:
- db_root_password
- db_password
healthcheck:
test: [ "CMD", "mysqladmin", "ping", "-h", "localhost" ]
interval: 10s
timeout: 3s
retries: 3
secrets:
db_password:
file: ./db_password.txt
db_root_password:
file: ./db_root_password.txt
volumes:
data: