mirror of
https://github.com/Noratrieb/vps.git
synced 2026-01-14 16:55:00 +01:00
ports
This commit is contained in:
parent
6f4c143683
commit
99d5edbb94
1 changed files with 4 additions and 4 deletions
|
|
@ -6,20 +6,20 @@ if [ "$STAGE" = "localhost" ] ;
|
||||||
then
|
then
|
||||||
echo "INFO Running on localhost"
|
echo "INFO Running on localhost"
|
||||||
NGINX_CONF="nginx.local.conf"
|
NGINX_CONF="nginx.local.conf"
|
||||||
CERT_VOLUME=""
|
EXTRA_ARGS="-p 80:80"
|
||||||
else
|
else
|
||||||
echo "INFO Running on prod"
|
echo "INFO Running on prod"
|
||||||
NGINX_CONF="nginx.conf"
|
NGINX_CONF="nginx.conf"
|
||||||
CERT_VOLUME="-v=/etc/letsencrypt:/etc/nginx/certs"
|
EXTRA_ARGS="-v=/etc/letsencrypt:/etc/nginx/certs -p 443:443"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if docker container inspect nginx > /dev/null 2>&1 ;
|
if docker container inspect nginx > /dev/null 2>&1 ;
|
||||||
then
|
then
|
||||||
echo "INFO nginx container exists already..."
|
echo "INFO nginx container exists already..."
|
||||||
else
|
else
|
||||||
docker run -d -p 80:80 -p 443:443 --restart=always --name=nginx \
|
docker run -d --restart=always --name=nginx \
|
||||||
-v="$SCRIPT_DIR/$NGINX_CONF:/etc/nginx/nginx.conf:ro" \
|
-v="$SCRIPT_DIR/$NGINX_CONF:/etc/nginx/nginx.conf:ro" \
|
||||||
$CERT_VOLUME \
|
$EXTRA_ARGS \
|
||||||
--net=internal \
|
--net=internal \
|
||||||
nginx:latest
|
nginx:latest
|
||||||
fi
|
fi
|
||||||
Loading…
Add table
Add a link
Reference in a new issue