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.
19 lines
741 B
Desktop File
19 lines
741 B
Desktop File
[Unit]
|
|
Description=Nginx HTTP/S ingress for %I
|
|
Wants=nginx-ingress.service %i.service
|
|
After=nginx-ingress.service %i.service
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
RemainAfterExit=true
|
|
Environment=SERVER_NAME=%i SSL_CERT_NAME=%i UPSTREAM_HOST=%i UPSTREAM_PORT=8080
|
|
Environment=NGINX_CONF=/etc/container-service/nginx/service/%p.conf.template
|
|
ExecStart=/bin/sh -c "envsubst '$SERVER_NAME $SERVER_NAME_ALT $SSL_CERT_NAME $UPSTREAM_HOST $UPSTREAM_PORT' \
|
|
< ${NGINX_CONF} > /var/lib/container-service/nginx-ingress/conf.d/%i.conf"
|
|
ExecStartPost=/bin/systemctl reload nginx-ingress
|
|
ExecStop=/bin/rm /var/lib/container-service/nginx-ingress/conf.d/%i.conf
|
|
ExecStopPost=/bin/systemctl reload nginx-ingress
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|