frappe_docker/images/nginx/install-app.sh
Lev Vereshchagin 037c6f340a Remove git reference from install-app
Also fixed issue with missing sites/assets folder
2022-03-29 12:15:43 +03:00

24 lines
452 B
Bash
Executable file

#!/bin/bash
set -e
set -x
APP=$1
cd /frappe-bench
# Add all not built assets
cp -r "apps/$APP/$APP/public" "/out/assets/$APP"
# Add production node modules
yarn --cwd "apps/$APP" --prod
cp -r "apps/$APP/node_modules" "/out/assets/$APP/node_modules"
# Add built assets
yarn --cwd "apps/$APP"
echo "$APP" >>sites/apps.txt
yarn --cwd apps/frappe run production --app "$APP"
cp -r sites/assets /out
# Cleanup
rm -rf "apps/$APP"
rm -rf sites/assets/*