#!/bin/bash set -e up () { loginctl enable-linger $USER 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,jf,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 > $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 } $@