This file contains hidden or 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
Output | |
Please choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP access. | |
------------------------------------------------------------------------------- | |
1: No redirect - Make no further changes to the webserver configuration. | |
2: Redirect - Make all requests redirect to secure HTTPS access. Choose this for | |
new sites, or if you're confident your site works on HTTPS. You can undo this | |
change by editing your web server's configuration. | |
------------------------------------------------------------------------------- | |
Select the appropriate number [1-2] then [enter] (press 'c' to cancel): |
This file contains hidden or 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
Output | |
IMPORTANT NOTES: | |
- Congratulations! Your certificate and chain have been saved at | |
/etc/letsencrypt/live/example.com/fullchain.pem. Your cert will | |
expire on 2017-10-23. To obtain a new or tweaked version of this | |
certificate in the future, simply run certbot again with the | |
"certonly" option. To non-interactively renew *all* of your | |
certificates, run "certbot renew" | |
- Your account credentials have been saved in your Certbot | |
configuration directory at /etc/letsencrypt. You should make a |
This file contains hidden or 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
after_success: | |
- chmod +x ./push.sh | |
- ./push.sh |
This file contains hidden or 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
#!/bin/bash | |
# add the commit info to the commit message | |
rev=$(git rev-parse --short HEAD) | |
# sets an email for the git | |
git config --global user.email "[email protected]" | |
# sets a username for the git | |
git config --global user.name "Travis CI" | |
# makes a git clone of the master branch | |
git clone -b master https://dennisotugo:${AUTOBUILD_TOKEN}@github.com/HNGInternship/HNGFun master | |
# makes a git clone of the prod branch |
This file contains hidden or 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
$ git config --global user.name "[Travis CI]" | |
$ git config --global user.email "[your github email]" |
This file contains hidden or 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
$ ssh username@localhost | |
$ mkdir /var/www/HNGFun | |
$ sudo chown -R username:username /var/www/HNGFun | |
$ git clone [email protected]/HNGInternship/HNGFun.git /var/www/HNGFun | |
$ cd /var/www/HNGFun |
This file contains hidden or 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
$ cd /var/www/HNGFun | |
$ touch deploy.php | |
$ sudo apt install nano | |
$ nano deploy.php |
This file contains hidden or 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
<?php | |
/** | |
* GIT DEPLOYMENT SCRIPT | |
* | |
* Used for automatically deploying websites via GitHub | |
* | |
*/ | |
// array of commands | |
$commands = array( | |
'echo $PWD', |
This file contains hidden or 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
# vim /etc/nginx/sites-available/hng.fun | |
server { | |
listen 80; | |
listen [::]:80; | |
root /var/www/roomhub/public; | |
index index.php index.html index.htm index.nginx-debian.html; | |
server_name roomhub.hng.fun www.roomhub.hng.fun; | |
location / { | |
try_files $uri $uri/ /index.php?$query_string; |
This file contains hidden or 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
#vim /etc/nginx/sites-available/hng.fun | |
server { | |
root /var/www/HNGFun; | |
index index.php index.html index.htm; | |
server_name hng.fun www.hng.fun; | |
location / { | |
try_files $uri $uri/ /index.php?$query_string; | |
} | |
location ~ \.php$ { |