From 4b8a05159f9ff7ac499a4afa94484130d88152ad Mon Sep 17 00:00:00 2001 From: Mario Alegre Date: Mon, 22 Jun 2020 01:52:02 +0000 Subject: [PATCH] changes to gitea container --- src/gitea/Containerfile | 16 ++++------------ src/gitea/assets/app.ini.esh | 4 ++-- src/gitea/assets/gitea.service | 2 +- src/gitea/bugfix/cronfix | 2 -- 4 files changed, 7 insertions(+), 17 deletions(-) delete mode 100644 src/gitea/bugfix/cronfix diff --git a/src/gitea/Containerfile b/src/gitea/Containerfile index 40359ab..3c620aa 100644 --- a/src/gitea/Containerfile +++ b/src/gitea/Containerfile @@ -8,15 +8,15 @@ FROM localhost/debian:latest LABEL deployopts="\ -p 9081:80 \ -p 9022:22 \ --v /tank/files/git:/vol/git \ --v /tank/files/db/gitea:/vol/db" +-v /srv/vol/gitea/git:/vol/git \ +-v /srv/vol/gitea/db:/vol/db" # make sure mount directories exist RUN mkdir -p /vol/git /vol/db # Build variables # version of Gitea # see the Gitea github page to determine the latest stable release -ARG giteav=1.11.5 +ARG giteav=1.12.1 # version of postgres ARG psqlv=11 # uid that the files owner user should have @@ -57,7 +57,7 @@ COPY --chown=postgres:postgres assets/pg_hba.conf /etc/postgresql/${psqlv}/main/ # dowload gitea RUN wget https://dl.gitea.io/gitea/${giteav}/gitea-${giteav}-linux-amd64 && \ - mv gitea /usr/local/bin/gitea && \ + mv gitea-${giteav}-linux-amd64 /usr/local/bin/gitea && \ chmod +x /usr/local/bin/gitea # make directories gitea needs @@ -82,11 +82,3 @@ COPY assets/gitea.service /etc/systemd/system/ ### COPY assets/crontab /root/ RUN crontab -u gitea /root/crontab - -### -### Bugfix -### - -# execute command to workaround bug in cron -COPY bugfix/cronfix /root/ -RUN chmod +x /root/cronfix && /root/cronfix diff --git a/src/gitea/assets/app.ini.esh b/src/gitea/assets/app.ini.esh index 4ce564e..532f1e2 100644 --- a/src/gitea/assets/app.ini.esh +++ b/src/gitea/assets/app.ini.esh @@ -26,8 +26,8 @@ PATH = /var/lib/gitea/data/gitea.db ROOT = /vol/git/repos [server] -DOMAIN = medusa.alemor.org -ROOT_URL = http://medusa.alemor.org/git/ +DOMAIN = git.alemor.org +ROOT_URL = https://git.alemor.org/ HTTP_PORT = 80 START_SSH_SERVER = true SSH_PORT = 4323 diff --git a/src/gitea/assets/gitea.service b/src/gitea/assets/gitea.service index 57f11d0..6f7908a 100644 --- a/src/gitea/assets/gitea.service +++ b/src/gitea/assets/gitea.service @@ -21,7 +21,7 @@ WorkingDirectory=/var/lib/gitea/ #RuntimeDirectory=gitea ExecStart=/usr/local/bin/gitea web --config /etc/gitea/app.ini Restart=always -Environment=USER=gitea HOME=/home/gitea GITEA_WORK_DIR=/var/lib/gitea +Environment=USER=gitea HOME=/var/lib/gitea GITEA_WORK_DIR=/var/lib/gitea # If you want to bind Gitea to a port below 1024, uncomment # the two values below, or use socket activation to pass Gitea its ports as above ### diff --git a/src/gitea/bugfix/cronfix b/src/gitea/bugfix/cronfix deleted file mode 100644 index 483c9dc..0000000 --- a/src/gitea/bugfix/cronfix +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -sed -i '/session required pam_loginuid.so/c\#session required pam_loginuid.so' /etc/pam.d/cron