feat: switch nginx container file to template to allow passing in dependent service
This commit is contained in:
parent
357245bcbf
commit
ef3bd59b13
2 changed files with 3 additions and 2 deletions
24
roles/nginx/templates/nginx.container.j2
Normal file
24
roles/nginx/templates/nginx.container.j2
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
[Unit]
|
||||
Description=nginx container
|
||||
Requires={{ nginx_dependent_service }}.service
|
||||
After={{ nginx_dependent_service }}.service
|
||||
|
||||
[Container]
|
||||
ContainerName=nginx
|
||||
Image=ghcr.io/nginxinc/nginx-unprivileged:mainline-alpine-slim
|
||||
PublishPort=80:8080
|
||||
PublishPort=443:8443
|
||||
Network=frontend.network
|
||||
Volume=/srv/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
|
||||
Volume=/srv/nginx/conf.d:/etc/nginx/conf.d:ro
|
||||
Volume=/srv/certs:/etc/nginx/ssl:Z
|
||||
PodmanArgs=--runtime runsc --security-opt label:disable
|
||||
Label=disable
|
||||
AutoUpdate=registry
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target default.target
|
||||
|
||||
[Service]
|
||||
Restart=always
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue