mirror of
https://github.com/frappe/frappe_docker.git
synced 2024-11-08 22:31:07 +00:00
f86b389466
* Add assets builder image * Use assets builder in custom_app tutorial * Use erpnext in custom app tutorial * Add info about base images (frappe or erpnext) * Add assets-builder image to frappe group so it is built in CI * Update backend image: - Fix mounted caching - Uncomplicate ERPNext build - Fix root-frappe permissions * Add build-assets script for simpler frontend build * Add install-app script for backend build * Rename build-assets to install-app for frontend build * Update custom app builds according to new main dockerfiles * Cache pip packages in custom app example backend dockerfile * Update custom app guide * Fix typo in backend dockerfile * Add info about install-app scripts in readme
30 lines
614 B
Bash
Executable File
30 lines
614 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
set -x
|
|
|
|
APP=$1 BRANCH=$2 GIT_URL=$3
|
|
|
|
cd /frappe-bench
|
|
|
|
if test "$BRANCH" && test "$GIT_URL"; then
|
|
# Clone in case not copied manually
|
|
git clone --depth 1 -b "$BRANCH" "$GIT_URL" "apps/$APP"
|
|
fi
|
|
|
|
# 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
|