scripts/fogcutter/podman/nginx.sh

45 lines
1.2 KiB
Bash
Raw Normal View History

2020-12-26 23:16:52 -05:00
#!/bin/bash
set -e
up () {
loginctl enable-linger paul
podman network create pew-net || true
# main nginx container
podman create \
--name nginx \
--env PUID=1000 \
--env GUID=1000 \
--env TZ=US/Eastern \
--env URL=seaturtle.pw \
--env SUBDOMAINS=airsonic,git,nc,plex \
--env VALIDATION=http \
--env EMAIL=paulsw.pw@gmail.com \
--volume /bigdata/k8s-config/nginx/config:/config:rw \
--volume /bigdata/k8s-config/nginx/nginx.conf:/config/nginx/nginx.conf:ro \
--volume /bigdata/k8s-config/nginx/ssl.conf:/config/nginx/ssl.conf:ro \
--volume /bigdata/k8s-config/nginx/site-confs:/config/nginx/site-confs:ro \
--publish 127.0.0.1:8080:80 \
--publish 127.0.0.1:8443:443 \
--network pew-net \
linuxserver/swag:1.10.1-ls29
podman generate systemd nginx --restart-policy=always --name > ~/.config/systemd/user/nginx.service
systemctl --user daemon-reload
systemctl restart --user nginx || systemctl start --user nginx
systemctl enable --user nginx
}
down () {
systemctl stop --user nginx || true
systemctl disable --user nginx || true
podman rm nginx || true
}
logs () {
podman logs --follow nginx
}
$@