Merge branch 'main' of https://github.com/Nilstrieb/vps into main

This commit is contained in:
nora 2022-09-10 21:33:24 +02:00
commit cbee61365e
4 changed files with 18 additions and 10 deletions

View file

@ -1,16 +1,17 @@
#!/usr/bin/env bash
set -eu pipefail
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
if [ "$STAGE" = "localhost" ] ;
if [ "${STAGE-}" = "prod" ] ;
then
echo "INFO Running on localhost"
NGINX_CONF="nginx.local.conf"
EXTRA_ARGS="-p 80:80"
else
echo "INFO Running on prod"
NGINX_CONF="nginx.conf"
EXTRA_ARGS="-v=/etc/letsencrypt:/etc/nginx/certs -p 443:443"
else
echo "INFO Running on localhost"
NGINX_CONF="nginx.local.conf"
EXTRA_ARGS="-p 80:80"
fi
if docker container inspect nginx > /dev/null 2>&1 ;