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.
 
 
 
 

61 lines
1.9 KiB

[Unit]
Description=Quay Container Registry Application
Documentation=https://docs.projectquay.io/
After=network.target redis-server.service var-lib-virtiofs-data.mount
Requires=redis-server.service var-lib-virtiofs-data.mount
# Only start if Quay has been configured
ConditionPathExists=/etc/quadlets/quay/app/config.yaml
# Start/stop this unit when the target is started/stopped
PartOf=quay.target
[Container]
ContainerName=quay-app
Image=quay-app.image
# Quay runs as the quay user (1001) inside the container
User=1001
Group=0
# UID/GID mapping to map the quay (1001/0) user inside the container to arbitrary user 10026 / group 10000 on the host
UIDMap=0:1000000:65535
UIDMap=+1001:10026:1
GIDMap=0:1000000:65535
GIDMap=+0:10000:1
# Network configuration
Network=host
# Storage
Volume=/var/lib/virtiofs/data/quay/storage:/datastorage:Z
# Configuration
Volume=/etc/quadlets/quay/app:/quay-registry/conf/stack:Z,ro
Volume=/run/quadlets/quay/tls/ssl.cert:/quay-registry/conf/stack/ssl.cert:Z,ro
Volume=/run/quadlets/quay/tls/ssl.key:/quay-registry/conf/stack/ssl.key:Z,ro
# Health check
HealthCmd=curl -sk https://localhost:8443/health/instance
HealthInterval=30s
HealthTimeout=10s
HealthStartPeriod=120s
HealthRetries=3
[Service]
Restart=always
RestartSec=10
TimeoutStartSec=120
TimeoutStopSec=30
# Load TLS certificates from Lego before starting the container
ExecStartPre=/etc/quadlets/quay/quay_load_tls_certs.sh
# Wait for PostgreSQL to be ready on localhost
ExecStartPre=/bin/sh -c 'exec 2>/dev/null; for try in $(seq 0 12); do if ! /bin/true 5<> /dev/tcp/127.0.0.1/5432; then echo "Waiting for PostgreSQL to be available..."; sleep 5; else exit 0; fi; done; exit 1'
# Wait for Redis to be ready on localhost
ExecStartPre=/bin/sh -c 'exec 2>/dev/null; for try in $(seq 0 12); do if ! /bin/true 5<> /dev/tcp/127.0.0.1/6379; then echo "Waiting for Redis to be available..."; sleep 5; else exit 0; fi; done; exit 1'
[Install]
WantedBy=quay.target