|
|
|
@ -2,7 +2,7 @@
|
|
|
|
|
# script to build local docker image. |
|
|
|
|
# highlevel steps involved |
|
|
|
|
# 1. Stop and remove existing container and image |
|
|
|
|
# 2. Build nocodb-sdk |
|
|
|
|
# 2. Install dependencies |
|
|
|
|
# 3. Build nc-gui |
|
|
|
|
# 3a. static build of nc-gui |
|
|
|
|
# 3b. copy nc-gui build to nocodb dir |
|
|
|
@ -23,11 +23,10 @@ function remove_image() {
|
|
|
|
|
docker rmi nocodb-local >/dev/null 2>&1 |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function build_sdk(){ |
|
|
|
|
# build nocodb-sdk |
|
|
|
|
cd ${SCRIPT_DIR}/packages/nocodb-sdk |
|
|
|
|
pnpm --filter=!playwright install --frozen-lockfile || ERROR="sdk build failed" |
|
|
|
|
pnpm run build || ERROR="sdk build failed" |
|
|
|
|
function install_dependencies() { |
|
|
|
|
# Install all dependencies |
|
|
|
|
cd ${SCRIPT_DIR} |
|
|
|
|
pnpm bootstrap || ERROR="install_dependencies failed" |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function build_gui(){ |
|
|
|
@ -35,7 +34,6 @@ function build_gui(){
|
|
|
|
|
export NODE_OPTIONS="--max_old_space_size=16384" |
|
|
|
|
# generate static build of nc-gui |
|
|
|
|
cd ${SCRIPT_DIR}/packages/nc-gui |
|
|
|
|
pnpm --filter=!playwright install --frozen-lockfile || ERROR="gui build failed" |
|
|
|
|
pnpm run generate || ERROR="gui build failed" |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -48,7 +46,6 @@ function package_nocodb(){
|
|
|
|
|
#build nocodb |
|
|
|
|
# build nocodb ( pack nocodb-sdk and nc-gui ) |
|
|
|
|
cd ${SCRIPT_DIR}/packages/nocodb |
|
|
|
|
pnpm install --frozen-lockfile || ERROR="package_nocodb failed" |
|
|
|
|
EE=true ./node_modules/.bin/webpack --config webpack.local.config.js || ERROR="package_nocodb failed" |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -73,8 +70,8 @@ echo "Info: Stopping and removing existing container and image" | tee ${LOG_FILE
|
|
|
|
|
stop_and_remove_container |
|
|
|
|
remove_image |
|
|
|
|
|
|
|
|
|
echo "Info: Building nocodb-sdk" | tee -a ${LOG_FILE} |
|
|
|
|
build_sdk 1>> ${LOG_FILE} 2>> ${LOG_FILE} |
|
|
|
|
echo "Info: Installing dependencies" | tee -a ${LOG_FILE} |
|
|
|
|
install_dependencies 1>> ${LOG_FILE} 2>> ${LOG_FILE} |
|
|
|
|
|
|
|
|
|
echo "Info: Building nc-gui" | tee -a ${LOG_FILE} |
|
|
|
|
build_gui 1>> ${LOG_FILE} 2>> ${LOG_FILE} |
|
|
|
|