Skip to content

antscript/DockerWeb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docker+nginx

What is DockerWeb ?

中文

DockerWeb is a website tool.

that allows you to easily create a website with static web page on your server/vps/cloud etc..

and auto deploy with Github or Bitbucket.


Features


Usage

Step 0: Install Docker and Git

Docker : https://docs.docker.com/engine/installation/

Git : https://git-scm.com/book/en/v2/Getting-Started-Installing-Git

Step 1: Fork and clone DockerWeb

if Bitbucket , Import DockerWeb from Github

Step 2: SSH key (only Bitbucket require)

copy or generate id_rsa and id_rsa.pub on your server : /root/.ssh/

Step 3: HTTPS (if necessary)

send your ssl.crt and ssl.key to server

Step 4: Edit setup/config.sh with your setting

if multi-web on host, let multi_site = true

Step 5: Commit and push your repository

Step 6: Add webhook

#Github  
Setting -> Webhooks & services -> add webhook
Payload URL : http(s)://yourdomain.com:9000/hooks/your_webhook_id
#Bitbucket  
Setting -> Webhooks  -> Add webhook
Title : title you want
URL   : http(s)://yourdomain.com:9000/hooks/your_webhook_id

Step 7: Login your server , clone repo and run setup/setup.sh

Step 8: Run multi-web/init.sh (only multi-web require)

Step 9: Visit your website

Step 10: Redeploy with Github or Bitbucket

Step 11: Add to startup on server

#single web with dockerWeb
cp path_to_dockerWeb/setup/dockerWebStartup /etc/init.d/
echo "/bin/sh /etc/init.d/dockerWebStartup" >> /etc/rc.d/rc.local
chmod +x /etc/rc.d/rc.local

#multiple web with dockerWeb
cp path_to_dockerWeb/multi-web/dockerWebStartup /etc/init.d/
echo "/bin/sh /etc/init.d/dockerWebStartup" >> /etc/rc.d/rc.local
chmod +x /etc/rc.d/rc.local

Manage multiple web with git branch

you can create multiple git repository for deploy multiple web. another way to deploy multiple web with single repository :

  • create different branch for different web
  • add webhooks with different webhook_id
  • checkout and push branch for deploy web on current branch

Video tutorial


3rd party tools


License

MIT license.

About

Deploy a website in 5 miniutes with docker

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published