-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9711387
commit e526ec8
Showing
1 changed file
with
38 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,39 @@ | ||
#!/bin/bash | ||
|
||
set -e # Exit immediately if a command exits with a non-zero status | ||
|
||
# Define the directory | ||
DIR="/root/valhub" | ||
|
||
cd $DIR | ||
|
||
# Run valhub_makemigrations | ||
echo "Running makemigrations..." | ||
python3 manage.py makemigrations | ||
|
||
# Run valhub_migrate | ||
echo "Running migrations..." | ||
python3 manage.py migrate | ||
|
||
# Run valhub_initial_data | ||
echo "Loading initial data..." | ||
python3 manage.py loaddata initial_data.json | ||
|
||
# Run valhub_collectstatic | ||
echo "Collecting static files..." | ||
python3 manage.py collectstatic --noinput | ||
|
||
# Run valhub_superuser | ||
echo "Creating superuser..." | ||
{ | ||
python3 manage.py createsuperuser --noinput | ||
} || { | ||
echo "Superuser already exists, skipping creation." | ||
} | ||
|
||
# Starting supervisord | ||
echo "Starting supervisord..." | ||
supervisord -c /root/valhub/supervisord.conf -n | ||
|
||
# # Keep the container running | ||
#!/bin/bash | ||
|
||
set -e # Exit immediately if a command exits with a non-zero status | ||
|
||
# Define the directory | ||
DIR="/root/valhub" | ||
|
||
cd $DIR | ||
|
||
# Run valhub_makemigrations | ||
echo "Running makemigrations..." | ||
python3 manage.py makemigrations | ||
|
||
# Run valhub_migrate | ||
echo "Running migrations..." | ||
python3 manage.py migrate | ||
|
||
# Run valhub_initial_data | ||
echo "Loading initial data..." | ||
python3 manage.py loaddata initial_data.json | ||
|
||
# Run valhub_collectstatic | ||
echo "Collecting static files..." | ||
python3 manage.py collectstatic --noinput | ||
|
||
# Run valhub_superuser | ||
echo "Creating superuser..." | ||
{ | ||
python3 manage.py createsuperuser --noinput | ||
} || { | ||
echo "Superuser already exists, skipping creation." | ||
} | ||
|
||
# Starting supervisord | ||
echo "Starting supervisord..." | ||
supervisord -c /root/valhub/supervisord.conf -n | ||
|
||
# # Keep the container running | ||
# tail -f /dev/null |