Collection of cookbooks for Podman Quadlets
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

43 lines
1.1 KiB

[Unit]
Description=Update Nginx root directory from a Git repository
Documentation=https://hub.docker.com/r/alpine/git
After=network-online.target
Before=nginx-server.service
# Only start if the service has been configured
ConditionPathExists=/etc/quadlets/nginx/config.env
# And if the git repo has already been cloned
ConditionPathExists=/var/lib/quadlets/nginx/.git
# Start/stop this unit when the target is started/stopped
PartOf=nginx.target
[Container]
ContainerName=nginx-update-job
Image=docker.io/alpine/git:latest
# Network configuration
Network=host
# Those environment variables will be injected by podman into the container
EnvironmentFile=/etc/quadlets/nginx/config.env
# Clone the website repository
Exec=pull
WorkingDir=/var/git
# Volume mounts
Volume=/var/lib/quadlets/nginx:/var/git:z
[Service]
Restart=no
TimeoutStartSec=30
# These environment variables are sourced to be used by systemd in the Exec* commands
EnvironmentFile=/etc/quadlets/nginx/config.env
# This container is a job - run once to completion
Type=oneshot
[Install]
WantedBy=nginx.target