Built from makenew/npm-package.
Local https server for triggered git deploys.
Runs an Express server that listen for git POST receive hooks and triggers deploys via Git fetch and reset.
The images are built and hosted automatically on Docker Hub at ourtownrentals/git-deploy.
Pull with
$ docker pull ourtownrentals/git-deploy
The container exposes the data volume /srv
which hosts the deployed code.
The following environment variables can be set to configure the deploy (defaults shown):
DEPLOY_REPO
DEPLOY_BRANCH
If not set, the following defaults will be used:
- Repo:
https://github.com/ourtownrentals/test-php-app.git
. - Branch:
master
.
For git repos over SSH, the container looks for the key files at
/root/.ssh/deploy
and /root/.ssh/deploy.pub
and will use them if found.
The container expects a valid ssl certificate
at /etc/ssl/private/deploy.crt
and the corresponding key at /etc/ssl/private/deploy.key
.
The server listens on port 443, but since that port is generally reserved for the actual application, you should bind to a different port, e.g.,
$ docker run -p 8443:443 \
-v /etc/ssl/private/deploy:/etc/ssl/private \
git-deploy
The git-deploy source is hosted on GitHub. Clone the project with
$ git clone https://github.com/ourtownrentals/docker-git-deploy.git
You will need Node.js with npm.
Install the dependencies with
$ npm install
Start the server with
$ npm start
Build and run the container with
$ docker build -t git-deploy .
$ docker run -p 443:443 -v $(pwd)/test/private:/etc/ssl/private git-deploy
Please submit and comment on bug reports and feature requests.
To submit a patch:
- Fork it (https://github.com/ourtownrentals/docker-git-deploy/fork).
- Create your feature branch (
git checkout -b my-new-feature
). - Make changes.
- Commit your changes (
git commit -am 'Add some feature'
). - Push to the branch (
git push origin my-new-feature
). - Create a new Pull Request.
This app is licensed under the MIT license.
This software is provided "as is" and without any express or implied warranties, including, without limitation, the implied warranties of merchantibility and fitness for a particular purpose.