As a reference and perhaps an example for how to run proget as quadlets, here are my config files for quadlets:
- /etc/containers/systemd/mssql.container
[Unit]
Description=Microsoft SQL server
[Service]
Restart=always
# Extend Timeout to allow time to pull the image
TimeoutStartSec=900
[Container]
Image=mcr.microsoft.com/mssql/server:2019-latest
EnvironmentFile=/etc/mssql.env
Volume=/var/data/mssql:/var/opt/mssql:U,Z
Network=inedo.network
HostName=inedo-sql
[Install]
WantedBy=multi-user.target
- /etc/containers/systemd/proget.container
[Unit]
Description=Inedo proget
After=mssql.service
Requires=mssql.service
[Service]
Restart=always
# Extend Timeout to allow time to pull the image
TimeoutStartSec=900
[Container]
Image=localhost/proget:current
EnvironmentFile=/etc/proget.env
Volume=/var/data/proget/backups:/var/proget/backups:z
Volume=/var/data/proget/database:/var/proget/database:z
Volume=/var/data/proget/extensions:/var/proget/extensions:z
Volume=/var/data/proget/packages:/var/proget/packages:z
Volume=/var/data/proget/ssl:/var/proget/ssl:z
Volume=/etc/localtime:/etc/localtime:ro
Network=inedo.network
PublishPort=80:80
HostName=proget
[Install]
WantedBy=multi-user.target
- /etc/containers/systemd/inedo.network
[Network]
Remarks:
The Image
in /etc/containers/systemd/proget.container is intentionally referencing a locally tagged image. This goes together with the following script for easily updating
proget:
#!/bin/bash
set -e
set -x
systemctl stop proget
sleep 5
itag=latest
if [ $# -eq 1 ] ; then
itag=$1
fi
podman tag proget:current proget:previous
podman pull proget.inedo.com/productimages/inedo/proget:${itag}
podman tag proget.inedo.com/productimages/inedo/proget:${itag} proget:current
systemctl start proget
cat<<EOF
Upgrade finished and proget started.
Old image has benn tagged proget:previous
EOF
and: Obviously, the hierarchy below /var/data/proget has to be manually created in advance. /var/data/proget is on a separate virtual disk.
Forgot the env files referenced in the .container files:
/etc/mssql.env:
ACCEPT_EULA=Y
MSSQL_SA_PASSWORD=*****REDACTED*****
MSSQL_PID=Express
/etc/proget.env:
PROGET_SQL_CONNECTION_STRING=Data Source=inedo-sql; Initial Catalog=ProGet; User ID=sa; Password=*****REDACTED*****
TZ=Europe/Berlin
Both are mode 0600, so that the passwords in there are a little bit more protected.
And: Just after freshly setting it all up, I normally immediately migrate to embedded postgres and then remove the mssql container as well as the inedo network.
Cheers
-Fritz