2020-12-26 23:16:52 -05:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
up () {
|
2020-12-28 19:38:09 -05:00
|
|
|
loginctl enable-linger $USER
|
2020-12-26 23:16:52 -05:00
|
|
|
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 \
|
2020-12-27 03:14:45 -05:00
|
|
|
--env SUBDOMAINS=airsonic,git,jf,nc,plex \
|
2020-12-26 23:16:52 -05:00
|
|
|
--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
|
|
|
|
|
2020-12-28 19:38:09 -05:00
|
|
|
podman generate systemd nginx --restart-policy=always --name > $HOME/.config/systemd/user/nginx.service
|
2020-12-26 23:16:52 -05:00
|
|
|
systemctl --user daemon-reload
|
2020-12-27 03:14:45 -05:00
|
|
|
systemctl start --user nginx || systemctl restart --user nginx
|
2020-12-26 23:16:52 -05:00
|
|
|
systemctl enable --user nginx
|
|
|
|
}
|
|
|
|
|
|
|
|
down () {
|
|
|
|
systemctl stop --user nginx || true
|
|
|
|
systemctl disable --user nginx || true
|
|
|
|
podman rm nginx || true
|
|
|
|
}
|
|
|
|
|
|
|
|
logs () {
|
|
|
|
podman logs --follow nginx
|
|
|
|
}
|
|
|
|
|
|
|
|
$@
|