forked from inuits/925r
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.dev.yaml
More file actions
32 lines (29 loc) · 1.36 KB
/
compose.dev.yaml
File metadata and controls
32 lines (29 loc) · 1.36 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
services:
ninetofiver:
environment:
- DJANGO_SETTINGS_MODULE=${DJANGO_SETTINGS_MODULE?}
- DJANGO_CONFIGURATION=${DJANGO_CONFIGURATION?}
- CFG_FILE_PATH=${CFG_FILE_PATH?}
- MYSQL_DATABASE=${MYSQL_DATABASE?}
- MYSQL_USER=${MYSQL_USER?}
- MYSQL_PASSWORD=${MYSQL_PASSWORD?}
- PYTHONDONTWRITEBYTECODE=${PYTHONDONTWRITEBYTECODE?}
- PYTHONUNBUFFERED=${PYTHONUNBUFFERED?}
command: |
bash -c "
python manage.py migrate
echo \"from django.contrib.auth import get_user_model; User = get_user_model(); User.objects.create_superuser('${SUPERUSER_USERNAME?}', '${SUPERUSER_EMAIL?}', '${SUPERUSER_PASSWORD?}')\" | python manage.py shell || true
echo \"from oauth2_provider.models import Application; from django.contrib.auth import get_user_model; User = get_user_model(); client = Application.objects.create(user=User.objects.filter(is_staff=True)[0], name='${API_APPLICATION_NAME?}', client_id='${API_APPLICATION_CLIENT_ID?}', client_secret='${API_APPLICATION_CLIENT_SECRET?}', authorization_grant_type=Application.GRANT_PASSWORD)\" | python manage.py shell || true
python manage.py runserver 0.0.0.0:8000
"
volumes:
- ninetofiver-files:/code
volumes:
ninetofiver-files:
driver: local
driver_opts:
o: bind
type: none
device: ${PWD?}
networks:
ninetofiver: