static site paas
1.0.0
作者:帕哈茲·布利諾夫
倉庫:https://github.com/pahaz/static-site-paas/
您需要靜態網站的 SAAS 嗎?或者您想建立自己的靜態網站託管?這個項目幫助你!
wget https://raw.githubusercontent.com/pahaz/static-site-paas/master/bootstrap.sh sudo bash bootstrap.sh
然後你需要加入你的 ssh 金鑰:
sshcommand acl-add static <使用者名稱> <金鑰檔案>
或者:
捲曲 https://github.com/<GITHUB-USERNAME>.keys | sshcommand acl-add static <GITHUB-USERNAME>
例如,您有伺服器88.85.211.202和 DNS 名稱8iq.ru 。只需為您的伺服器新增 DNS 記錄@ A 88.85.211.202和* A 88.85.211.202即可。
您應該會看到 404 nginx 頁面。
您想要部署test1.8iq.ru靜態網站。只需git clone一個範例並進行git push :
$ git clone https://github.com/pahaz/dokku-static-site.git test1.8iq.ru
Cloning into ' test1.8iq.ru ' ...
remote: Counting objects: 75, done.
remote: Compressing objects: 100% (50/50), done.
remote: Total 75 (delta 23), reused 73 (delta 21), pack-reused 0
Unpacking objects: 100% (75/75), done.
$ cd test1.8iq.ru然後透過git push部署它:
$ git push [email protected]:test1.8iq.ru master
Counting objects: 75, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (71/71), done.
Writing objects: 100% (75/75), 152.88 KiB | 0 bytes/s, done.
Total 75 (delta 23), reused 0 (delta 0)
To 8iq.ru:test1.8iq.ru
* [new branch] master - > master部署命令:
$ git push static@<server>:<site-url> master
然後您可以將此網站部署到另一個子網域prod1.8iq.ru :
$ git push [email protected]:prod1.8iq.ru master
如果您想更改模板並將其push送到您的 github 儲存庫,只需更改來源:
$ git remote set-url origin https://github.com/USERNAME/OTHERREPOSITORY.git真的有必要嗎?僅用於靜態網站產生器整合。如果您確實遇到這種情況,請建立一個問題。