Skip to content

A simple way to rebuild your web app container on every commit with local `docker-compose` and `post-commit` `git` hook

Notifications You must be signed in to change notification settings

mtilson/git-post-commit-hooks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A simple way to rebuild your web app container on every commit with local docker-compose and post-commit git hook

  1. Initialize your git repo with git init
  2. Place the attached post-commit file into .git/hooks/ directory and make it executable with chmod +x .git/hooks/post-commit
  3. Use the attached docker-compose.yaml and Dockerfile as examples to create and run container
  4. The .env file is not commited to VCS as it may contain secure configuration details. Put variables there like the following ones:
    • APPNAME=myapp
    • APPVERSION=latest
  5. post-commit working directory is the repo root, it is the same one where .git is located
  6. The post-commit script is Linux and MacOS compartible
  7. Logs for building and running container is available in /tmp/git-post-commit as APPNAME-YYYYMMDD-HHMMSS-XXX files
  8. Link to the Repo

About

A simple way to rebuild your web app container on every commit with local `docker-compose` and `post-commit` `git` hook

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published