mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-12 23:35:50 +00:00
21 lines
588 B
Bash
Executable File
21 lines
588 B
Bash
Executable File
#!/bin/bash
|
|
# For that to work, node v12.19.0 needs to be installed with nvm for root
|
|
# or NPM_BIN Path and NVM_DIR must be adjusted
|
|
|
|
cd /var/www/html/gradido
|
|
eval "echo \"$(cat .env.local)\"" > .env
|
|
eval "echo \"$(cat .env.shell)\"" >> .env
|
|
cd frontend
|
|
|
|
NPM_BIN=/root/.nvm/versions/node/v12.19.0/bin/npm
|
|
|
|
export NVM_DIR="/root/.nvm"
|
|
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
|
|
|
|
$NPM_BIN install
|
|
$NPM_BIN run build
|
|
# prezip for faster deliver throw nginx
|
|
cd dist
|
|
find . -type f -name "*.css" -exec gzip -9 -k {} \;
|
|
find . -type f -name "*.js" -exec gzip -9 -k {} \;
|