mirror of
https://github.com/deuill/coreos-home-server.git
synced 2024-09-21 13:40:45 +00:00
Alex Palaistras
d9f675817e
This contains the culmination of work done privately for a few months, and is intended to be a solid basis for other peoples' experimentations with setting up single-node, home-server setups using Fedora CoreOS.
23 lines
839 B
Desktop File
23 lines
839 B
Desktop File
[Unit]
|
|
Description=Nginx static web service for %I
|
|
Wants=container-build@%i.service container-network@ingress.service
|
|
After=container-build@%i.service container-network@ingress.service
|
|
Before=nginx-ingress-http@%i.service
|
|
|
|
[Service]
|
|
Restart=always
|
|
PrivateTmp=true
|
|
Environment=SERVER_NAME=%i
|
|
Environment=NGINX_CONF=/etc/container-service/nginx/service/%p.conf.template
|
|
ExecStartPre=/bin/install -d /tmp/conf.d
|
|
ExecStartPre=/bin/sh -c "envsubst '$SERVER_NAME' < ${NGINX_CONF} > /tmp/conf.d/%i.conf"
|
|
ExecStartPre=/bin/podman create --replace --pull never --net ingress \
|
|
--volume /tmp/conf.d:/etc/nginx/conf.d:z \
|
|
--name %i localhost/%i:latest
|
|
ExecStart=/bin/podman start --attach %i
|
|
ExecStop=/bin/podman stop --time 10 %i
|
|
|
|
[Install]
|
|
Alias=%i.service
|
|
WantedBy=multi-user.target
|