forked from okfde/froide-theme
-
-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathrun-backend.sh
More file actions
executable file
·31 lines (25 loc) · 729 Bytes
/
run-backend.sh
File metadata and controls
executable file
·31 lines (25 loc) · 729 Bytes
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
#!/bin/ash
#yarn install
#yarn build
yarn serve dev &
if [[ "${INITIALIZE_DB}" == "y" ]] || [[ "${INITIALIZE_DB}" == "Y" ]];
then
echo "Initializing database"
# To initialise the database:
uv run ./manage.py migrate --skip-checks
# Create and populate search index
echo "Creating search indices..."
uv run ./manage.py search_index --create
uv run ./manage.py search_index --populate
else
echo "Skipping database initialization and creation of search indices"
fi
if [[ "${LOAD_DATA}" == "y" ]] || [[ "${LOAD_DATA}" == "Y" ]];
then
echo "Load the seed data..."
uv run ./manage.py loaddata uipa_org/fixtures/*
else
echo "Skipping seed data load"
fi
export DEBUG
uv run /bin/ash /srv/django/run-django.sh