Added rootless and plain custom dockerfiles

This commit is contained in:
Dmitriy Shishkov 2023-10-08 18:48:02 +03:00
commit 9340e2689d
Signed by: dm1sh
GPG Key ID: 027994B0AA357688
4 changed files with 76 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
/data/
/config/

8
Dockerfile Normal file
View File

@ -0,0 +1,8 @@
FROM gitea/gitea:1.20.5
RUN apk --no-cache add py3-pip pandoc-cli
RUN pip3 install --upgrade pip
RUN pip3 install nbconvert
COPY custom/app.ini /data/gitea/conf/app.ini

12
Dockerfile.rootless Normal file
View File

@ -0,0 +1,12 @@
FROM gitea/gitea:1.20.5-rootless
USER root:root
RUN apk --no-cache add py3-pip pandoc-cli
RUN pip3 install --upgrade pip
RUN pip3 install nbconvert
USER git:git
COPY custom/ /etc/gitea/custom

54
custom/app.ini Normal file
View File

@ -0,0 +1,54 @@
APP_NAME = dm1sh gitea
[server]
LANDING_PAGE = "/dm1sh"
; [database]
; DB_TYPE = postgres
; HOST = ***:5432
; NAME = gitea
; USER = gitea
; PASSWD = ***
; CHARSET = utf8
[admin]
DEFAULT_EMAIL_NOTIFICATIONS = onmention
[service]
DISABLE_REGISTRATION = true
; [mailer]
; ENABLED = true
; FROM = gitea@dmitriy.icu
; SMTP_ADDR = mail.dmitriy.icu
; SMTP_PORT = 465
; USER = gitea@dmitriy.icu
; PASSWD = `***`
[markup.jupyter]
ENABLED = true
FILE_EXTENSIONS = .ipynb
RENDER_COMMAND = "jupyter nbconvert --stdin --stdout --to html --template basic"
IS_INPUT_FILE = false
[markup.sanitizer.jupyter.img]
ALLOW_DATA_URI_IMAGES = true
[markup.sanitizer.TeX]
ELEMENT = span
ALLOW_ATTR = class
REGEXP = ^\s*((math(\s+|$)|inline(\s+|$)|display(\s+|$)))+
[markup.docx]
ENABLED = true
FILE_EXTENSIONS = .docx
RENDER_COMMAND = "timeout 30s pandoc +RTS -M512M -RTS -f docx --to html --embed-resources --mathml"
[markup.sanitizer.docx.img]
ALLOW_DATA_URI_IMAGES = true
[markup.odt]
ENABLED = true
FILE_EXTENSIONS = .odt
RENDER_COMMAND = "timeout 30s pandoc +RTS -M512M -RTS -f odt --to html --embed-resources --mathml"
RENDER_CONTENT_MODE = no-sanitizer