Skip to content

Instantly share code, notes, and snippets.

@evzpav
Last active May 9, 2019 15:16
Show Gist options
  • Save evzpav/0e405a84698e7240645ddddf6e480f4f to your computer and use it in GitHub Desktop.
Save evzpav/0e405a84698e7240645ddddf6e480f4f to your computer and use it in GitHub Desktop.
Script to be run on Single Page Application like Vue, Angular, React to deploy on dokku
#!/bin/bash
#create .static empty file
touch .static
# create deploy script
echo "
#!/bin/bash
rm -rf dist/*
npm run build
git add -A dist
git commit -m \"up to dokku\"
git push dokku master " > up_dokku.sh
chmod 700 up_dokku.sh
#Remember to run on server
#dokku config:set $MYPROJECT NGINX_ROOT=dist BUILDPACK_URL=https://github.com/dokku/buildpack-nginx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment