summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSunil Shetye2025-01-21 22:30:23 +0530
committerSunil Shetye2025-01-21 22:30:23 +0530
commitaef1c4efaa636cba648eb7a0eb525acc1db487a7 (patch)
treeea53eb487672934903ef4eef5f1d747c589cc464
parent7de6ed2536d87cf8d82b490108224ac767ddd26c (diff)
downloadCommon-Interface-Project-aef1c4efaa636cba648eb7a0eb525acc1db487a7.tar.gz
Common-Interface-Project-aef1c4efaa636cba648eb7a0eb525acc1db487a7.tar.bz2
Common-Interface-Project-aef1c4efaa636cba648eb7a0eb525acc1db487a7.zip
redirect /files/ also
-rwxr-xr-xblocks/install.sh18
-rwxr-xr-xblocks/run.sh4
2 files changed, 13 insertions, 9 deletions
diff --git a/blocks/install.sh b/blocks/install.sh
index ec9af85d..57d5a14a 100755
--- a/blocks/install.sh
+++ b/blocks/install.sh
@@ -14,10 +14,10 @@ python manage.py migrate -v0
python manage.py loaddata -v0 xcosblocks
sed -i \
- -e "s/\\(SCILAB_DIR = \\).*/\\1'\/usr\/local'/" \
- -e "s/\\(CELERY_BROKER_URL = \\).*/\\1'redis:\\/\\/localhost:6379\\/1'/" \
- -e "s/\\(CELERY_RESULT_BACKEND = \\).*/\\1'redis:\\/\\/localhost:6379\\/1'/" \
- blocks/settings.py
+ -e "s/\\(SCILAB_DIR = \\).*/\\1'\/usr\/local'/" \
+ -e "s/\\(CELERY_BROKER_URL = \\).*/\\1'redis:\\/\\/localhost:6379\\/1'/" \
+ -e "s/\\(CELERY_RESULT_BACKEND = \\).*/\\1'redis:\\/\\/localhost:6379\\/1'/" \
+ blocks/settings.py
sed -i -e '/^\s*location \/ {/,/^\s*}/c\
location / {\
@@ -34,6 +34,10 @@ sed -i -e '/^\s*location \/ {/,/^\s*}/c\
proxy_pass http://127.0.0.1:8000;\
}\
\
+ location /files/ {\
+ proxy_pass http://127.0.0.1:8000;\
+ }\
+\
location /resources/ {\
proxy_pass http://127.0.0.1:3500;\
expires 7d;\
@@ -51,10 +55,10 @@ sed -i -e '/^\s*location \/ {/,/^\s*}/c\
cd eda-frontend
if test "$1" = 'prod'; then
- npm install -g serve
+ npm install -g serve
fi
npm install --silent
if test "$1" = 'prod'; then
- npm run build
- rm -rf node_modules public src
+ npm run build
+ rm -rf node_modules public src
fi
diff --git a/blocks/run.sh b/blocks/run.sh
index 02e6e55c..2266ddde 100755
--- a/blocks/run.sh
+++ b/blocks/run.sh
@@ -10,9 +10,9 @@ celery -A blocks.celery_tasks worker --loglevel INFO --concurrency 1 &
cd eda-frontend
if test "$1" = 'prod'; then
- serve -l 3500 -n -s --no-port-switching build &
+ serve -l 3500 -n -s --no-port-switching build &
else
- npm start &
+ npm start &
fi
cd ..