57 lines
3.3 KiB
Django/Jinja
57 lines
3.3 KiB
Django/Jinja
[Unit]
|
|
Description=Podman container-git-gitea.service
|
|
Documentation=man:podman-generate-systemd(1)
|
|
Wants=network.target
|
|
After=network-online.target
|
|
BindsTo=pod-git.service
|
|
After=pod-git.service
|
|
OnFailure=status-mail@%n.service
|
|
|
|
[Service]
|
|
Environment=PODMAN_SYSTEMD_UNIT=%n
|
|
Restart=on-failure
|
|
TimeoutStopSec=70
|
|
ExecStartPre=/bin/rm -f %t/container-git-gitea.pid %t/container-git-gitea.ctr-id
|
|
ExecStart=/usr/bin/podman run \
|
|
--conmon-pidfile %t/container-git-gitea.pid \
|
|
--cidfile %t/container-git-gitea.ctr-id \
|
|
--cgroups=no-conmon \
|
|
--pod-id-file %t/pod-git.pod-id \
|
|
--replace \
|
|
--label "io.containers.autoupdate=image" \
|
|
-dt \
|
|
--add-host=pod-database:{{ services_all_services['database'].address }} \
|
|
-v {{ services_root_directory }}/valkyrie-resolv.conf:/etc/resolv.conf:ro \
|
|
-v {{ services_data_directory }}/pod-git/data/_data:/data \
|
|
-v /etc/timezone:/etc/timezone:ro \
|
|
-v /etc/localtime:/etc/localtime:ro \
|
|
-e USER_UID="1000" \
|
|
-e USER_GID="1000" \
|
|
-e GITEA__database__DB_TYPE="postgres" \
|
|
-e GITEA__database__HOST="pod-database:5432" \
|
|
-e GITEA__database__NAME="{{ services[services_service_name].database_name }}" \
|
|
-e GITEA__database__USER="{{ services[services_service_name].database_user }}" \
|
|
-e GITEA__database__PASSWD="{{ services[services_service_name].database_passwd }}" \
|
|
-e GITEA__server__DOMAIN="{{ services[services_service_name].domain }}" \
|
|
-e GITEA__server__ROOT_URL="https://%(DOMAIN)s/" \
|
|
-e GITEA__server__START_SSH_SERVER="true" \
|
|
-e GITEA__server__SSH_PORT="{{ services[services_service_name].ssh_port }}" \
|
|
-e GITEA__server__SSH_LISTEN_PORT="{{ services[services_service_name].ssh_port }}" \
|
|
-e GITEA__mailer__ENABLED="true" \
|
|
-e GITEA__mailer__FROM="Gitea <git@{{ services[services_service_name].domain }}>" \
|
|
-e GITEA__mailer__MAILER_TYPE="smtp" \
|
|
-e GITEA__mailer__HOST="{{ services[services_service_name].smtp_host }}" \
|
|
-e GITEA__mailer__USER="{{ services[services_service_name].smtp_user }}" \
|
|
-e GITEA__mailer__PASSWD="{{ services[services_service_name].smtp_passwd }}" \
|
|
-e GITEA__service__DISABLE_REGISTRATION="true" \
|
|
-e GITEA__service__ENABLE_NOTIFY_MAIL="true" \
|
|
--name=pod-git-gitea \
|
|
docker.io/gitea/gitea:{{ services_deploy_versions.git.gitea }}
|
|
ExecStop=/usr/bin/podman stop --ignore --cidfile %t/container-git-gitea.ctr-id -t 10
|
|
ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/container-git-gitea.ctr-id
|
|
PIDFile=%t/container-git-gitea.pid
|
|
Type=forking
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target default.target
|