Skip to content

Instantly share code, notes, and snippets.

@profstolley
Last active April 18, 2022 15:56
Show Gist options
  • Save profstolley/9d4baf6e73be444c900c19a8d5458ddb to your computer and use it in GitHub Desktop.
Save profstolley/9d4baf6e73be444c900c19a8d5458ddb to your computer and use it in GitHub Desktop.
Deploy scripts and configs
#!/bin/zsh
APP_DOMAIN=something.example.com
GIT_REPO=$HOME/repo/$APP_DOMAIN.git
TMP_GIT_CLONE=$HOME/tmp/$APP_DOMAIN
PUBLIC_WWW=/var/www/$APP_DOMAIN/app
git clone $GIT_REPO $TMP_GIT_CLONE
cd $TMP_GIT_CLONE
npm install
rm -rf $PUBLIC_WWW
mv $TMP_GIT_CLONE $PUBLIC_WWW
exit
server {
# Listening, SSL things go here
location / {
proxy_pass http://127.0.0.1:3232;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment