-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathexample6-proxy.service.in
41 lines (36 loc) · 1.17 KB
/
example6-proxy.service.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# This file should be preprocessed with the envsubst command
# to convert such text strings: ${envsubst_variablename}
[Unit]
Wants=network-online.target
After=network-online.target
Requires=user@${envsubst_uid}.service
After=user@${envsubst_uid}.service
Requires=example6-backend.socket
After=example6-backend.socket
RequiresMountsFor=/run/user/${envsubst_uid}/containers
[Service]
User=${envsubst_user}
Environment=PODMAN_SYSTEMD_UNIT=%n
KillMode=mixed
ExecStop=/usr/bin/podman rm -f -i --cidfile=/run/user/${envsubst_uid}/%N.cid
ExecStopPost=-/usr/bin/podman rm -f -i --cidfile=/run/user/${envsubst_uid}/%N.cid
Delegate=yes
Type=notify
NotifyAccess=all
SyslogIdentifier=%N
ExecStart=/usr/bin/podman run \
--cidfile=/run/user/${envsubst_uid}/%N.cid \
--cgroups=split \
--rm \
--env "NGINX=3;" \
-d \
--network=none \
--replace \
--userns keep-id:uid=101,gid=101 \
--user 0:0 \
--name systemd-%N \
--sdnotify=conmon \
--security-opt label=disable \
--volume /home/${envsubst_user}/nginx-reverse-proxy-conf:/etc/nginx/conf.d:Z \
--volume /run/user/${envsubst_uid}/backend-socket:/var/socket:Z \
docker.io/library/nginx