Skip to content

Instantly share code, notes, and snippets.

@notfood
Created April 27, 2021 02:26
Show Gist options
  • Save notfood/00bc8a1809fd282a82497343469772ff to your computer and use it in GitHub Desktop.
Save notfood/00bc8a1809fd282a82497343469772ff to your computer and use it in GitHub Desktop.
cd
sudo yum -y install npm
git clone https://github.com/drawpile/dpwebadmin Drawpile-Web-Admin
cd Drawpile-Web-Admin
cat <<EOF | tee .env
REACT_APP_BASENAME=/admin
REACT_APP_APIROOT=/admin/api
REACT_APP_AUTHMODE=basic
EOF
mv package.json package-orig.json
node -p "JSON.stringify({...require('./package-orig.json'), homepage: '.'}, 0, 2)" > package.json
npm install
npm run build
sudo mv build /var/www/html/admin
sudo restorecon -R /var/www/html/admin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment