Skip to content

cartesiancs/devent-deploy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

head

devent-deploy

Automatic container deployment system using Github webhook

To-Do

  • Webhook endpoint designation
  • Docker interworking
  • Create container image
  • Create container
  • Git clone and download
  • Fix git clone event
  • Edit image tag
  • Container version control
  • Event logic separation
  • Auth Git clone
  • Patch container env.

Execute

start

npm run start

start(production)

npm run start:prod

start(development)

npm run start:dev

Webhook

endpoint url

https://test.test/api/webhook/github

Preferences

1. create config file

./backend/config/setting.json

{
    "GITHUB_SECRET":"<github_webhook_secret>",
    "GITHUB_PAT":"",
    "CLONE_REPO_DIR":"<github_repo_local_dir>",
    "ENABLE_USERS":["DipokalLab"]
}

2. nginx-proxy

docker run --detach \
    --name deploy-nginx-proxy \
    --publish 80:80 \
    --publish 443:443 \
 	  -e HTTP_PORT=80 \
	  -e HTTPS_PORT=443 \
    --volume certs:/etc/nginx/certs \
    --volume vhost:/etc/nginx/vhost.d \
    --volume html:/usr/share/nginx/html \
    --volume /var/run/docker.sock:/tmp/docker.sock:ro \
    nginxproxy/nginx-proxy:alpine

3. nginx-proxy

docker run --detach \
    --name deploy-nginx-proxy-letsencrypt \
    --volumes-from deploy-nginx-proxy \
    --volume /var/run/docker.sock:/var/run/docker.sock:ro \
    --volume acme:/etc/acme.sh \
    --env "[email protected]" \
    nginxproxy/acme-companion

Then create and run a './deployenv' file on the service. An example of a 'deployenv' file. Separators are commas.

4. update container env

http://localhost:9003/env

About

🚀 Auto Deployment Service with Docker

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published