commit 9340e2689d6b88094243347381f4dff915f9be48 Author: dm1sh Date: Sun Oct 8 18:48:02 2023 +0300 Added rootless and plain custom dockerfiles diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..50d5035 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/data/ +/config/ \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..4783c08 --- /dev/null +++ b/Dockerfile @@ -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 diff --git a/Dockerfile.rootless b/Dockerfile.rootless new file mode 100644 index 0000000..781b1c9 --- /dev/null +++ b/Dockerfile.rootless @@ -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 diff --git a/custom/app.ini b/custom/app.ini new file mode 100644 index 0000000..df286c2 --- /dev/null +++ b/custom/app.ini @@ -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