From 296a4d2f44c1d235c32b6b8eaa1484ed4054edfd Mon Sep 17 00:00:00 2001 From: KosM Date: Mon, 19 Dec 2022 15:11:21 +0200 Subject: [PATCH] add docker dev files , needed to start dev in docker environment. --- Dockerfile | 10 ++++++++++ docker-compose.yml | 21 +++++++++++++++++++++ header.tmpl | 1 + install.sh | 2 ++ 4 files changed, 34 insertions(+) create mode 100644 Dockerfile create mode 100644 docker-compose.yml create mode 100644 header.tmpl 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