48 lines
1.3 KiB
Bash
Executable File
48 lines
1.3 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
up () {
|
|
loginctl enable-linger $USER
|
|
podman network create pew-net || true
|
|
|
|
# main nginx container
|
|
# for local access hard-code IP in /etc/hosts and use browser addon to force redirect to 8443
|
|
podman create \
|
|
--name nginx \
|
|
--env PUID=1000 \
|
|
--env GUID=1000 \
|
|
--env TZ=US/Eastern \
|
|
--env URL=seaturtle.pw \
|
|
--env SUBDOMAINS=airsonic,ff,git,jf,m,matrix,nc,plex \
|
|
--env VALIDATION=http \
|
|
--env EMAIL=paulsw.pw@gmail.com \
|
|
--volume /bigdata/files:/files:ro \
|
|
--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:80:80 \
|
|
--publish 443:443 \
|
|
--publish 8448:8448 \
|
|
--network pew-net \
|
|
linuxserver/swag:1.10.1-ls29
|
|
|
|
podman generate systemd nginx --restart-policy=always --name > $HOME/.config/systemd/user/nginx.service
|
|
systemctl --user daemon-reload
|
|
systemctl start --user nginx || systemctl restart --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
|
|
}
|
|
|
|
$@
|