diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..d2d3af6 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,10 @@ +FROM gogs/gogs:0.12 + +# In docker "custom" dir is /data/gogs/ and there is no need to create named "custom" dir +# there, /data/gogs/ works by default as custom. +WORKDIR /data/gogs/ +RUN mkdir -p templates/inject && mkdir -p public/css/themes \ +&& mkdir -p public/img + +# ADD ./themes /data/gogs/public/css/themes +# ADD ./img /data/gogs/public/img/ \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..3f23167 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,21 @@ +version: "3" + +services: + gogs: + build: + context: . + dockerfile: ./Dockerfile + container_name: gogs + restart: unless-stopped + volumes: + - "gogs_data:/data" + - "./themes:/data/gogs/public/css/themes" + - "./img:/data/gogs/public/img" + - "./header.tmpl:/data/gogs/templates/inject/head.tmpl" + ports: + - "10022:22" + - "3000:3000" + +volumes: + gogs_data: + diff --git a/header.tmpl b/header.tmpl new file mode 100644 index 0000000..d8b33d5 --- /dev/null +++ b/header.tmpl @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/install.sh b/install.sh index 4e28b53..5da6487 100755 --- a/install.sh +++ b/install.sh @@ -1,3 +1,5 @@ +#!/bin/bash + mkdir -p ../custom/templates/inject/ mkdir -p ../custom/public/css/ rm ../custom/templates/inject/head.tmpl