-
Notifications
You must be signed in to change notification settings - Fork 5
/
entrypoint.sh
36 lines (30 loc) · 1.25 KB
/
entrypoint.sh
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
#!/bin/bash
# Collect static files
echo "Collect static files"
python manage.py collectstatic --noinput
# Apply database migrations
echo "Apply database migrations"
python manage.py makemigrations
python manage.py migrate
# Seed DB
echo "DB: loading groups ..."
python manage.py loaddata kicoma/kitchen/fixtures/skupiny.json
echo "DB: loading users ..."
python manage.py loaddata kicoma/kitchen/fixtures/uzivatele.json
# python manage.py loaddata kicoma/kitchen/fixtures/druhy-jidla.json
# python manage.py loaddata kicoma/kitchen/fixtures/alergeny.json
# python manage.py loaddata kicoma/kitchen/fixtures/dph.json
# python manage.py loaddata kicoma/kitchen/fixtures/skupiny-stravniku.json
# python manage.py loaddata kicoma/kitchen/fixtures/article.json
# python manage.py loaddata kicoma/kitchen/fixtures/recipe.json
# python manage.py loaddata kicoma/kitchen/fixtures/recipe_article.json
# python manage.py loaddata kicoma/kitchen/fixtures/daily_menu.json
# Create super users admim/admin
echo "Creating super user"
DJANGO_SUPERUSER_USERNAME=admin DJANGO_SUPERUSER_PASSWORD=admin \
python manage.py createsuperuser [email protected] --noinput
# Running test suite
# python manage.py test
# Start server
echo "Starting server"
python manage.py runserver 0.0.0.0:8000