Dockerfile with hugo, git and nginx that updates via git push
- Git clone this repository
- Create the directories
html,reposandkeys - Copy the public ssh key from your pc / laptop into the
keysfolder - Create a
.envfile and insert the following contents
CONTAINER_NAME=yourcontainer
URL=yourdomain.de
GIT_PORT=2222
- Copy a bare clone of your repository into the
reposfolder and rename it torepo.git - Copy the file
post-receive.tmplinto the your repo folder ashooks/post-receive, replace the YOURREPO placeholder and make it executable. - Run
docker-compose up -dto start the container and link it with jwilder/nginx-proxy - The push/pull url is: ssh://git@yourdomain.de:yourport/git-server/repos/repo.git