diff --git a/service/hugo/container/config/deploy.sh b/service/hugo/container/config/deploy.sh index 3d0034f..002f89f 100755 --- a/service/hugo/container/config/deploy.sh +++ b/service/hugo/container/config/deploy.sh @@ -28,4 +28,4 @@ else cd "$GIT_DIR_NAME" fi -hugo --verbose --destination "/build/${GIT_DIR_NAME}" +hugo --logLevel info --minify --destination "/build/${GIT_DIR_NAME}" diff --git a/service/hugo/quadlet/hugo.container b/service/hugo/quadlet/hugo.container new file mode 100644 index 0000000..db97f91 --- /dev/null +++ b/service/hugo/quadlet/hugo.container @@ -0,0 +1,19 @@ +[Unit] +Description=Hugo static site builder +Wants=container-build@%N.service container-volume@%N.service nginx-serve-volume@%N.service +After=container-build@%N.service container-volume@%N.service +Before=nginx-serve-volume@%N.service + +[Container] +ContainerName=%N +EnvironmentFile=%E/coreos-home-server/%N/%N.env +Image=localhost/%N:latest +Network=internal +Volume=%N:/build:z +Volume=%N-ssh:/etc/ssh/keys:z + +[Service] +Restart=on-failure + +[Install] +WantedBy=multi-user.target diff --git a/service/hugo/spec.bu b/service/hugo/spec.bu index 759b64c..e793ee1 100644 --- a/service/hugo/spec.bu +++ b/service/hugo/spec.bu @@ -4,9 +4,5 @@ storage: trees: - path: /etc/coreos-home-server/hugo local: service/hugo/ - - path: /etc/systemd/system - local: service/hugo/systemd/ -systemd: - units: - - name: hugo.service - enabled: true + - path: /etc/containers/systemd + local: service/hugo/quadlet/ diff --git a/service/hugo/systemd/hugo.service b/service/hugo/systemd/hugo.service deleted file mode 100644 index f1a5e72..0000000 --- a/service/hugo/systemd/hugo.service +++ /dev/null @@ -1,22 +0,0 @@ -[Unit] -Description=Hugo static site builder -Wants=container-build@%N.service container-volume@%N.service nginx-serve-volume@%N.service -After=container-build@%N.service container-volume@%N.service -Before=nginx-serve-volume@%N.service - -[Service] -Type=notify -NotifyAccess=all -SyslogIdentifier=%N -Restart=on-failure -Environment=PODMAN_SYSTEMD_UNIT=%n -ExecStart=/bin/podman run --replace --name %N --net internal --sdnotify=conmon \ - --env-file %E/coreos-home-server/%N/%N.env \ - --volume %N:/build:z \ - --volume %N-ssh:/etc/ssh/keys:z \ - localhost/%N:latest -ExecStop=/bin/podman stop --ignore --time 10 %N -ExecStopPost=/bin/podman rm --ignore --force %N - -[Install] -WantedBy=multi-user.target