33source .env
44
55# Install or update dependencies on every start in case something changed
6- python3 -m pipenv install --dev
6+ pipenv install --dev
7+
8+ # Some users prefer to develop on their host rather than containers and have adjusted .env
9+ if [ $POSTGRES_HOST == " localhost" ]; then
10+ echo -e " \033[33mWARNING: Your \$ POSTGRES_HOST variable points to localhost not db!\033[0m"
11+ fi
712
813# Wait for database to be available before running migrations
914until pg_isready -h " $POSTGRES_HOST " -U " $POSTGRES_USER " & > /dev/null; do
@@ -12,22 +17,22 @@ until pg_isready -h "$POSTGRES_HOST" -U "$POSTGRES_USER" &> /dev/null; do
1217done
1318
1419# Apply pending migrations on every start
15- python3 -m pipenv run python -m serveradmin migrate --no-input
20+ pipenv run python -m serveradmin migrate --no-input
1621
1722# Requires Django >= 3.x
1823# pipenv run python -m serveradmin createsuper --no-input
19- python3 -m pipenv run python -m serveradmin createdefaultuser
24+ pipenv run python -m serveradmin createdefaultuser
2025
2126# Create default application
22- python3 -m pipenv run python -m serveradmin createapp --non-interactive
27+ pipenv run python -m serveradmin createapp --non-interactive
2328
2429echo -e "
2530********************************************************************************
2631
2732\e[32m[TIPS]\e[39m
2833- Run 'docker compose exec web /bin/bash' to access web service
29- - Run 'python3 -m pipenv run python -m serveradmin -h' in web service to access django commands
30- - Run 'python3 -m pipenv run python -m adminapi example.com' in web service to make adminapi queries
34+ - Run 'pipenv run python -m serveradmin -h' in web service to access django commands
35+ - Run 'pipenv run python -m adminapi example.com' in web service to make adminapi queries
3136
3237\e[33mAccess serveradmin from your browser via:\e[39m
3338- URL: http://127.0.0.1:8000
@@ -38,4 +43,4 @@ echo -e "
3843"
3944
4045# Start development server reachable for host machine
41- python3 -m pipenv run python -m serveradmin runserver 0.0.0.0:8000
46+ pipenv run python -m serveradmin runserver 0.0.0.0:8000
0 commit comments