Dockerfile with hugo, git and nginx that updates via git push
- Git clone this repository
- Create the directories
html
,repos
andkeys
- Copy the public ssh key from your pc / laptop into the
keys
folder - Create a
.env
file and insert the following contents
CONTAINER_NAME=yourcontainer
URL=yourdomain.de
GIT_PORT=2222
- Copy a bare clone of your repository into the
repos
folder and rename it torepo.git
- Copy the file
post-receive.tmpl
into the your repo folder ashooks/post-receive
, replace the YOURREPO placeholder and make it executable. - Run
docker-compose up -d
to 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