mirror of
https://github.com/deuill/coreos-home-server.git
synced 2024-09-21 13:40:45 +00:00
gitea: Update to version 1.20.2, move to Quadlet
This commit is contained in:
parent
7764f0fde0
commit
8ea73709e8
@ -1,14 +1,12 @@
|
|||||||
FROM docker.io/debian:bullseye-slim
|
FROM docker.io/debian:bookworm-slim
|
||||||
ARG VERSION=1.20.1
|
ARG VERSION=1.20.2
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
ENV PACKAGE_URL https://dl.gitea.io/gitea/${VERSION}/gitea-${VERSION}-linux-amd64
|
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 update -y && apt-get upgrade -y && \
|
||||||
|
apt-get install -y --no-install-recommends curl ca-certificates gettext gosu \
|
||||||
RUN apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false curl
|
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 addgroup --system --gid 10000 git
|
||||||
RUN adduser --system --uid 10000 --ingroup git --home /var/lib/gitea git
|
RUN adduser --system --uid 10000 --ingroup git --home /var/lib/gitea git
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
APP_NAME = ${GITEA_APP_NAME}
|
APP_NAME = ${GITEA_APP_NAME}
|
||||||
|
WORK_PATH = /var/lib/gitea
|
||||||
RUN_USER = git
|
RUN_USER = git
|
||||||
RUN_MODE = prod
|
RUN_MODE = prod
|
||||||
|
|
||||||
|
@ -2,9 +2,6 @@
|
|||||||
|
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
# Export shared variables.
|
|
||||||
export GITEA_WORK_DIR=/var/lib/gitea
|
|
||||||
|
|
||||||
# Create configuration file from collected templates.
|
# Create configuration file from collected templates.
|
||||||
envsubst < /etc/gitea/config.ini.template > /etc/gitea/config.ini
|
envsubst < /etc/gitea/config.ini.template > /etc/gitea/config.ini
|
||||||
|
|
||||||
|
18
service/gitea/quadlet/gitea.container
Normal file
18
service/gitea/quadlet/gitea.container
Normal 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
|
@ -4,9 +4,5 @@ storage:
|
|||||||
trees:
|
trees:
|
||||||
- path: /etc/coreos-home-server/gitea
|
- path: /etc/coreos-home-server/gitea
|
||||||
local: service/gitea/
|
local: service/gitea/
|
||||||
- path: /etc/systemd/system
|
- path: /etc/containers/systemd
|
||||||
local: service/gitea/systemd/
|
local: service/gitea/quadlet/
|
||||||
systemd:
|
|
||||||
units:
|
|
||||||
- name: gitea.service
|
|
||||||
enabled: true
|
|
||||||
|
@ -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
|
|
Loading…
Reference in New Issue
Block a user