gitea: Enable and start on health-check pass

This commit is contained in:
Alex Palaistras 2023-10-29 16:44:05 +00:00
parent f536787fb6
commit 95d279be7a
2 changed files with 6 additions and 5 deletions

View File

@ -2,11 +2,10 @@ FROM docker.io/debian:bookworm-slim
ARG VERSION=1.20.5 ARG VERSION=1.20.5
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 apt-get update -y && apt-get upgrade -y && \ RUN apt-get update -y && apt-get upgrade -y && apt-get install -y --no-install-recommends \
apt-get install -y --no-install-recommends curl ca-certificates gettext gosu \ curl ca-certificates gettext gosu git openssh-client gnupg
git openssh-client gnupg && \
curl -L -o /usr/bin/gitea ${PACKAGE_URL} && chmod +x /usr/bin/gitea && \ RUN 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

View File

@ -6,8 +6,10 @@ After=container-build@%N.service container-volume@%N.service lldap.service
[Container] [Container]
ContainerName=%N ContainerName=%N
EnvironmentFile=%E/coreos-home-server/%N/%N.env EnvironmentFile=%E/coreos-home-server/%N/%N.env
HealthCmd=timeout 5s curl --fail --silent --show-error localhost:8080/api/healthz > /dev/null
Image=localhost/%N:latest Image=localhost/%N:latest
Network=internal Network=internal
PodmanArgs=--sdnotify=healthy
PublishPort=7920:7920 PublishPort=7920:7920
Volume=%N:/var/lib/%N:z Volume=%N:/var/lib/%N:z