scripts/fogcutter/docker/nginx.sh

43 lines
1.0 KiB
Bash
Raw Normal View History

2020-12-26 23:16:52 -05:00
#!/bin/bash
set -e
up () {
2021-05-16 21:41:38 -04:00
docker network create pew-net || true
2020-12-26 23:16:52 -05:00
# main nginx container
2021-05-16 21:41:38 -04:00
# for local access hard-code IP in /etc/hosts
docker run \
--detach \
2020-12-26 23:16:52 -05:00
--name nginx \
2021-05-16 21:41:38 -04:00
--restart unless-stopped \
2020-12-26 23:16:52 -05:00
--env PUID=1000 \
--env GUID=1000 \
--env TZ=US/Eastern \
--env URL=seaturtle.pw \
--env VALIDATION=http \
--env EMAIL=paulsw.pw@gmail.com \
2022-03-23 12:29:21 -04:00
--env SUBDOMAINS=cave,ff,git,jf,nc,plex \
--env EXTRA_DOMAINS=paul.walko.org,mp.bigcavemaps.com,tile.bigcavemaps.com \
2021-05-16 21:41:38 -04:00
--volume /bigdata/k8s-config/nginx/nginx.conf:/config/nginx/nginx.conf:ro \
2021-01-09 13:17:54 -05:00
--volume /bigdata/files:/files:ro \
2020-12-26 23:16:52 -05:00
--volume /bigdata/k8s-config/nginx/config:/config:rw \
--volume /bigdata/k8s-config/nginx/ssl.conf:/config/nginx/ssl.conf:ro \
--volume /bigdata/k8s-config/nginx/site-confs:/config/nginx/site-confs:ro \
2022-02-26 12:14:35 -05:00
--publish 80:80 \
2021-01-16 17:28:15 -05:00
--publish 443:443 \
2020-12-26 23:16:52 -05:00
--network pew-net \
2022-02-26 12:14:35 -05:00
ghcr.io/linuxserver/swag:latest
2020-12-26 23:16:52 -05:00
}
down () {
2021-05-16 21:41:38 -04:00
docker stop nginx || true
docker rm nginx || true
2020-12-26 23:16:52 -05:00
}
logs () {
2021-05-16 21:41:38 -04:00
docker logs --follow nginx
2020-12-26 23:16:52 -05:00
}
$@