add docker dev files , needed to start dev in docker environment.

This commit is contained in:
KosM 2022-12-19 15:11:21 +02:00
parent 751afb4f89
commit 296a4d2f44
4 changed files with 34 additions and 0 deletions

10
Dockerfile Normal file
View file

@ -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/

21
docker-compose.yml Normal file
View file

@ -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:

1
header.tmpl Normal file
View file

@ -0,0 +1 @@
<link rel="stylesheet" href="/css/themes/dark_theme.css">

View file

@ -1,3 +1,5 @@
#!/bin/bash
mkdir -p ../custom/templates/inject/
mkdir -p ../custom/public/css/
rm ../custom/templates/inject/head.tmpl