https://github.com/cartesiancs/devent-deploy
🚀 Auto Deployment Service with Docker
https://github.com/cartesiancs/devent-deploy
docker
Last synced: about 2 months ago
JSON representation
🚀 Auto Deployment Service with Docker
- Host: GitHub
- URL: https://github.com/cartesiancs/devent-deploy
- Owner: cartesiancs
- License: mit
- Created: 2022-02-20T09:35:26.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-07-03T01:46:54.000Z (almost 4 years ago)
- Last Synced: 2025-03-21T06:17:02.150Z (about 1 year ago)
- Topics: docker
- Language: JavaScript
- Homepage:
- Size: 263 KB
- Stars: 0
- Watchers: 0
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

# devent-deploy
Automatic container deployment system using Github webhook
## To-Do
* [x] Webhook endpoint designation
* [x] Docker interworking
* [x] Create container image
* [x] Create container
* [x] Git clone and download
* [x] Fix git clone event
* [x] Edit image tag
* [x] Container version control
* [x] Event logic separation
* [x] Auth Git clone
* [x] 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
```json
{
"GITHUB_SECRET":"",
"GITHUB_PAT":"",
"CLONE_REPO_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 "DEFAULT_EMAIL=hhj@devent.kr" \
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