ansible-edda/playbooks/roles/services/deploy/git/templates/systemd/container-git-gitea.service

57 lines
3.3 KiB
SYSTEMD
Raw Normal View History

2022-11-15 00:34:50 +01:00
[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 \
2022-12-17 00:09:05 +01:00
--add-host=pod-database:{{ services_all_services['database'].address }} \
2023-02-12 19:37:33 +01:00
-v {{ services_root_directory }}/{{ services_resolv_host }}-resolv.conf:/etc/resolv.conf:ro \
2022-12-18 00:05:58 +01:00
-v {{ services_data_directory }}/pod-git/data/_data:/data \
2022-11-15 00:34:50 +01:00
-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" \
2022-12-17 00:09:05 +01:00
-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 }}" \
2022-11-15 00:34:50 +01:00
-e GITEA__server__ROOT_URL="https://%(DOMAIN)s/" \
2022-11-18 23:57:18 +01:00
-e GITEA__server__START_SSH_SERVER="true" \
2022-12-17 00:09:05 +01:00
-e GITEA__server__SSH_PORT="{{ services[services_service_name].ssh_port }}" \
-e GITEA__server__SSH_LISTEN_PORT="{{ services[services_service_name].ssh_port }}" \
2022-11-15 00:34:50 +01:00
-e GITEA__mailer__ENABLED="true" \
2022-12-17 00:09:05 +01:00
-e GITEA__mailer__FROM="Gitea <git@{{ services[services_service_name].domain }}>" \
2022-11-15 00:34:50 +01:00
-e GITEA__mailer__MAILER_TYPE="smtp" \
2022-12-17 00:09:05 +01:00
-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 }}" \
2022-11-15 00:34:50 +01:00
-e GITEA__service__DISABLE_REGISTRATION="true" \
-e GITEA__service__ENABLE_NOTIFY_MAIL="true" \
--name=pod-git-gitea \
2022-12-17 00:09:05 +01:00
docker.io/gitea/gitea:{{ services_deploy_versions.git.gitea }}
2022-11-15 00:34:50 +01:00
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