#!/bin/bash echo "Creating vanilla predeploy!" # Set path correclty if [[ $PWD == *"dist" ]]; then cd .. fi # If .env exists, ignore it if [[ ! -f ".env" ]];then echo "Building vanilla env file!" echo "KHUFU_UPLOAD_PATH=/srv/uploads">> .env fi # Install node dependencies echo "Installing node depencencies!" npm i echo "Building JS Bundle!" npm run build:react echo "Building docker image" docker-compose build