Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wuttinanhi/autodeploy
automatic deploy to server from push
https://github.com/wuttinanhi/autodeploy
deploy deployment-automation docker docker-compose git nodejs
Last synced: 22 days ago
JSON representation
automatic deploy to server from push
- Host: GitHub
- URL: https://github.com/wuttinanhi/autodeploy
- Owner: wuttinanhi
- License: mit
- Created: 2020-10-30T10:45:37.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-02-28T19:16:55.000Z (almost 4 years ago)
- Last Synced: 2023-03-04T06:13:38.240Z (almost 2 years ago)
- Topics: deploy, deployment-automation, docker, docker-compose, git, nodejs
- Language: JavaScript
- Homepage:
- Size: 58.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
AUTODEPLOY
a docker image listening for commit changes and automatic deploy to server.## Table of Contents
- [About the Project](#about-the-project)
- [Getting Started](#getting-started)
- [Prerequisites](#prerequisites)
- [Installation](#installation)
- [Available Environment Variable](#available-environment-variable)
- [Volume](#volume)
- [Known issues](#known-issues)
- [License](#license)## About The Project
Have you tired of SSH to your server and run deployment command?
Did you make a small project and need test on the server quickly but you don't want to setup continuous integration?
Have you tired of managing SSH key?
Well, this thing might make it easy for you.## Getting Started
To get start you need to have some Docker knowledge.
If you want to modify this repository. you need JavaScript and Node.js.### Prerequisites
- [Docker](https://docs.docker.com/get-docker/)
### Installation
```
docker run -it -d \
--name="github-autodeploy" \
--restart="always" \
-e GITHUB_USERNAME="" \
-e GITHUB_KEY="" \
-e GITHUB_REPOSITORY="wuttinanhi/test-compose" \
-e GITHUB_BRANCH="test" \
-e DEPLOY_DIRECTORY="//autodeploy-repo" \
-e REFRESH_RATE=30000 \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /autodeploy:/autodeploy-repo \
wuttinanhi/autodeploy:latest
```## Available Environment Variable:
`GITHUB_USERNAME` (Optional)
Your GitHub username.`GITHUB_KEY` (Optional)
Your GitHub Personal Access Token.
You can get it at [https://github.com/settings/tokens](https://github.com/settings/tokens) **repo scope are needed**.`GITHUB_REPOSITORY` (Required)
Repository to listening for change.
Example value: `wuttinanhi/test-compose``GITHUB_BRANCH` (Required)
Branch to listening for change.
Example value: `test` `production``DEPLOY_DIRECTORY` (Optional)
Directory path for store downloaded repository.
Default value: `repo`
Example value: `//autodeploy-repo``REFRESH_RATE` (Optional)
Wait for amount of milliseconds to see changes again.
Default value: `15000`
Example value: `30000` (wait for 30 seconds) `60000` (wait 1 minute)## Volume:
**(REQUIRED)** Socket path are needed for contact docker daemon.
- For Windows:
`-v //var/run/docker.sock:/var/run/docker.sock`- For Linux:
`-v /var/run/docker.sock:/var/run/docker.sock`**(Optional)** Volume for store downloaded repository.
*Environment variable `DEPLOY_DIRECTORY` and mounted path need to be the **same**.
*Example value:*- Relative path:
- `-e DEPLOY_DIRECTORY=repo`
- `-v /autodeploy:/nodejs/repo`
- Absolute path:
- `-e DEPLOY_DIRECTORY=//autodeploy-repo`
- `-v /autodeploy:/autodeploy-repo`## Known issues
- Rate limiting
if you encounter this issue you can solve this by authentication with `GITHUB_USERNAME` and `GITHUB_KEY`
or change the amount of `REFRESH_RATE`.
[reference about this issue](https://docs.github.com/en/free-pro-team@latest/rest/overview/resources-in-the-rest-api#rate-limiting)## Contributing
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are **greatly appreciated**.
1. Fork the Project
2. Create your Feature Branch
3. Commit your Changes
4. Push to the Branch
5. Open a Pull Request## License
Distributed under the MIT License. See `LICENSE` for more information.