Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions oioioi_init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,18 @@ set -x
/sio2/oioioi/wait-for-it.sh -t 60 "${DATABASE_HOST:-db}:${DATABASE_PORT:-5432}"

if [ "$1" == "--dev" ]; then
echo "Checking frontend dependencies..."

if ! (cd ../oioioi && npm list --depth=0 > /dev/null 2>&1); then
echo "Dependencies mismatch or missing. Running npm install..."
(cd ../oioioi && npm install)
else
echo "Dependencies are up to date."
fi

echo "Building frontend assets..."
(cd ../oioioi && npm run build)

./manage.py migrate 2>&1 | tee /sio2/deployment/logs/migrate.log
./manage.py loaddata ../oioioi/extra/dbdata/default_admin.json

Expand Down