Browse Source

changes to gitea container

feature/startup-from-labels
Mario Alegre 5 years ago
parent
commit
4b8a05159f
  1. 16
      src/gitea/Containerfile
  2. 4
      src/gitea/assets/app.ini.esh
  3. 2
      src/gitea/assets/gitea.service
  4. 2
      src/gitea/bugfix/cronfix

16
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

4
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

2
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
###

2
src/gitea/bugfix/cronfix

@ -1,2 +0,0 @@
#!/bin/sh
sed -i '/session required pam_loginuid.so/c\#session required pam_loginuid.so' /etc/pam.d/cron
Loading…
Cancel
Save