-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deployment script for
dsteele.dev
(#7)
* added script for personal site setup * initial fixes from testing * initial site setup & deployment * minor fixes * added git pull * try changes to confs * another one * removed pushd/popd * finished fixes & got deployed * removed pushd/popd
- Loading branch information
Showing
6 changed files
with
65 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
server { | ||
gzip on; | ||
gzip_static on; | ||
gunzip on; | ||
gzip_types text/plain text/css application/json application/javascript application/octet-stream text/xml application/xml application/xml+rss text/javascript image/x-icon image/webp; | ||
gzip_proxied no-cache no-store private expired auth; | ||
gzip_min_length 1000; | ||
|
||
listen 80; | ||
listen [::]:80; | ||
server_name dsteele.dev www.dsteele.dev; | ||
|
||
root /var/www/html/dsteele.dev; | ||
|
||
index index.html index.htm; | ||
|
||
location ^~ /assets/ { | ||
gzip_static on; | ||
expires 12h; | ||
add_header Cache-Control public; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,22 @@ | ||
#!/bin/bash | ||
|
||
domain="dsteele.dev" | ||
umami_sub_domain="umami" | ||
DOMAINDEFAULT="dsteele.dev" | ||
domain="${1:-$DOMAINDEFAULT}" | ||
sub_domain="$2" | ||
ssl_email="dylansteele57@gmail.com" | ||
|
||
# Need to update the naming to the url of site ex. umami.dsteele.dev | ||
sudo rm -rf /etc/nginx/conf.d/* && sudo rm -rf /etc/nginx/sites-available/* | ||
# Copy Nginx config files | ||
sudo cp ~/backbone-src/.docker/nginx/conf.d/prod/* /etc/nginx/sites-available/ | ||
generateSSL() { | ||
local full_domain=$1 | ||
# Copy Nginx config files | ||
sudo cp ~/backbone-src/.docker/nginx/conf.d/prod/${full_domain}.conf /etc/nginx/sites-available/ | ||
|
||
sudo nginx -t | ||
sudo nginx -t | ||
|
||
sudo certbot --nginx --non-interactive --agree-tos --redirect -d ${umami_sub_domain}.${domain} -d www.${umami_sub_domain}.${domain} -m ${ssl_email} | ||
sudo certbot --nginx --non-interactive --agree-tos --redirect -d ${full_domain} -d www.${full_domain} -m ${ssl_email} | ||
} | ||
|
||
if [ -n "$sub_domain" ]; then | ||
generateSSL "$sub_domain.$domain" | ||
else | ||
generateSSL "$domain" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
|
||
remote_path="/var/www/html/dsteele.dev" | ||
|
||
/usr/bin/git clone https://github.com/dills122/dsteele.dev.git | ||
|
||
cd ./dsteele.dev | ||
|
||
git pull | ||
|
||
mkdir $remote_path | ||
|
||
/usr/bin/bash build-deploy.sh $remote_path | ||
|
||
/usr/bin/bash ~/backbone-src/scripts/certbot.sh dsteele.dev | ||
|
||
cd .. | ||
|
||
sudo systemctl restart nginx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters