forked from mathesar-foundation/mathesar
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.sh
More file actions
executable file
·25 lines (19 loc) · 686 Bytes
/
run.sh
File metadata and controls
executable file
·25 lines (19 loc) · 686 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
#!/usr/bin/env bash
# This script checks if Mathesar is running in dev mode
# or prod. If dev mode, it starts the vite dev server,
# else it runs a client build.
# This script is only supposed to be used either directly
# or with docker-compose. It rebuilds the client everytime
# Mathesar starts.
# For deployments, the DockerFile is configured to build the
# client. Hence, instead of using this script, the web server
# can be directly started.
cd mathesar_ui && npm install --unsafe-perm
# Run vite dev server only in dev mode
if [[ "$MODE" == "DEVELOPMENT" || "$1" == "dev" ]]; then
npm run dev &
else
npm run build
fi
cd ..
python manage.py runserver 0.0.0.0:8000 && fg