Rename second_run to first_run
This commit is contained in:
parent
120b86fa9a
commit
42965ba283
|
@ -173,7 +173,7 @@ migrations/
|
||||||
.vscode/
|
.vscode/
|
||||||
.pytest_cache/
|
.pytest_cache/
|
||||||
htmlcov/
|
htmlcov/
|
||||||
.second_run
|
.first_run
|
||||||
|
|
||||||
/src/static
|
/src/static
|
||||||
.idea/
|
.idea/
|
||||||
|
|
6
dev.sh
6
dev.sh
|
@ -9,7 +9,7 @@ run () {
|
||||||
|
|
||||||
setup () {
|
setup () {
|
||||||
overmind start -l db -D
|
overmind start -l db -D
|
||||||
if [ -f .second_run ]; then
|
if [ -f .direnv/first_run ]; then
|
||||||
sleep 2
|
sleep 2
|
||||||
python ./src/manage.py collectstatic --noinput
|
python ./src/manage.py collectstatic --noinput
|
||||||
python ./src/manage.py makemigrations
|
python ./src/manage.py makemigrations
|
||||||
|
@ -34,7 +34,7 @@ setup () {
|
||||||
python ./src/manage.py loaddata nets
|
python ./src/manage.py loaddata nets
|
||||||
python ./src/manage.py loaddata softwares
|
python ./src/manage.py loaddata softwares
|
||||||
python ./src/manage.py shell -c "from django.contrib.auth import get_user_model; User = get_user_model(); User.objects.create_superuser('admin', 'admin@example.com', 'password')"
|
python ./src/manage.py shell -c "from django.contrib.auth import get_user_model; User = get_user_model(); User.objects.create_superuser('admin', 'admin@example.com', 'password')"
|
||||||
touch .direnv/.second_run
|
touch .direnv/first_run
|
||||||
fi
|
fi
|
||||||
overmind quit
|
overmind quit
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@ docker (){
|
||||||
clean () {
|
clean () {
|
||||||
find . \( -name __pycache__ -o -name "*.pyc" \) -delete
|
find . \( -name __pycache__ -o -name "*.pyc" \) -delete
|
||||||
rm -rf htmlcov/
|
rm -rf htmlcov/
|
||||||
rm -f src/*/migrations/0*.py .direnv/.second_run
|
rm -f src/*/migrations/0*.py .direnv/first_run
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanall () {
|
cleanall () {
|
||||||
|
|
|
@ -106,7 +106,7 @@
|
||||||
pkgs.coreutils
|
pkgs.coreutils
|
||||||
inventory
|
inventory
|
||||||
(pkgs.writeShellScriptBin "start-inventory" ''
|
(pkgs.writeShellScriptBin "start-inventory" ''
|
||||||
if [ -f .second_run ]; then
|
if [ -f .first_run ]; then
|
||||||
sleep 2
|
sleep 2
|
||||||
${pkgs.inventoryEnv}/bin/django-admin collectstatic --noinput
|
${pkgs.inventoryEnv}/bin/django-admin collectstatic --noinput
|
||||||
${pkgs.inventoryEnv}/bin/django-admin makemigrations
|
${pkgs.inventoryEnv}/bin/django-admin makemigrations
|
||||||
|
@ -131,7 +131,7 @@
|
||||||
${pkgs.inventoryEnv}/bin/django-admin loaddata nets
|
${pkgs.inventoryEnv}/bin/django-admin loaddata nets
|
||||||
${pkgs.inventoryEnv}/bin/django-admin loaddata softwares
|
${pkgs.inventoryEnv}/bin/django-admin loaddata softwares
|
||||||
${pkgs.inventoryEnv}/bin/django-admin shell -c "from django.contrib.auth import get_user_model; User = get_user_model(); User.objects.create_superuser('admin', 'admin@example.com', 'password')"
|
${pkgs.inventoryEnv}/bin/django-admin shell -c "from django.contrib.auth import get_user_model; User = get_user_model(); User.objects.create_superuser('admin', 'admin@example.com', 'password')"
|
||||||
touch .second_run
|
touch .first_run
|
||||||
fi
|
fi
|
||||||
${pkgs.inventoryEnv}/bin/gunicorn network_inventory.wsgi:application --reload --bind 0.0.0.0:8000 --workers 3
|
${pkgs.inventoryEnv}/bin/gunicorn network_inventory.wsgi:application --reload --bind 0.0.0.0:8000 --workers 3
|
||||||
'')
|
'')
|
||||||
|
|
Loading…
Reference in New Issue