gitea: Update to version 1.20.2, move to Quadlet

This commit is contained in:
Alex Palaistras 2023-08-12 17:14:04 +01:00
parent 7764f0fde0
commit 8ea73709e8
6 changed files with 28 additions and 39 deletions

View File

@ -1,14 +1,12 @@
FROM docker.io/debian:bullseye-slim
ARG VERSION=1.20.1
RUN apt-get update -y && apt-get upgrade -y && \
apt-get install -y --no-install-recommends curl ca-certificates gettext gosu \
git openssh-client gnupg
FROM docker.io/debian:bookworm-slim
ARG VERSION=1.20.2
ENV PACKAGE_URL https://dl.gitea.io/gitea/${VERSION}/gitea-${VERSION}-linux-amd64
RUN curl -L -o /usr/bin/gitea ${PACKAGE_URL} && chmod +x /usr/bin/gitea
RUN apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false curl
RUN apt-get update -y && apt-get upgrade -y && \
apt-get install -y --no-install-recommends curl ca-certificates gettext gosu \
git openssh-client gnupg && \
curl -L -o /usr/bin/gitea ${PACKAGE_URL} && chmod +x /usr/bin/gitea && \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false curl
RUN addgroup --system --gid 10000 git
RUN adduser --system --uid 10000 --ingroup git --home /var/lib/gitea git

View File

@ -1,4 +1,5 @@
APP_NAME = ${GITEA_APP_NAME}
WORK_PATH = /var/lib/gitea
RUN_USER = git
RUN_MODE = prod

View File

@ -2,9 +2,6 @@
set -eu
# Export shared variables.
export GITEA_WORK_DIR=/var/lib/gitea
# Create configuration file from collected templates.
envsubst < /etc/gitea/config.ini.template > /etc/gitea/config.ini

View File

@ -0,0 +1,18 @@
[Unit]
Description=Gitea Self-Hosted Git Service
Wants=container-build@%N.service container-volume@%N.service lldap.service
After=container-build@%N.service container-volume@%N.service lldap.service
[Container]
ContainerName=%N
EnvironmentFile=%E/coreos-home-server/%N/%N.env
Image=localhost/%N:latest
Network=internal
PublishPort=7920:7920
Volume=%N:/var/lib/%N:z
[Service]
Restart=on-failure
[Install]
WantedBy=multi-user.target

View File

@ -4,9 +4,5 @@ storage:
trees:
- path: /etc/coreos-home-server/gitea
local: service/gitea/
- path: /etc/systemd/system
local: service/gitea/systemd/
systemd:
units:
- name: gitea.service
enabled: true
- path: /etc/containers/systemd
local: service/gitea/quadlet/

View File

@ -1,21 +0,0 @@
[Unit]
Description=Gitea Self-Hosted Git Service
Wants=container-build@%N.service container-volume@%N.service lldap.service
After=container-build@%N.service container-volume@%N.service lldap.service
[Service]
Type=notify
NotifyAccess=all
SyslogIdentifier=%N
Restart=on-failure
Environment=PODMAN_SYSTEMD_UNIT=%n
ExecStart=/bin/podman run --replace --name %N --net internal --sdnotify=conmon \
--env-file %E/coreos-home-server/%N/%N.env \
--publish 7920:7920 \
--volume %N:/var/lib/%N:z \
localhost/%N:latest
ExecStop=/bin/podman stop --ignore --time 10 %N
ExecStopPost=/bin/podman rm --ignore --force %N
[Install]
WantedBy=multi-user.target