mirror of
https://github.com/deuill/coreos-home-server.git
synced 2024-09-21 05:30:45 +00:00
hugo: Move to Quadlet, minify HTML by default
This commit is contained in:
parent
3465082806
commit
7764f0fde0
@ -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}"
|
||||
|
19
service/hugo/quadlet/hugo.container
Normal file
19
service/hugo/quadlet/hugo.container
Normal file
@ -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
|
@ -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/
|
||||
|
@ -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
|
Loading…
Reference in New Issue
Block a user