mirror of
https://github.com/Noratrieb/vps.git
synced 2026-01-14 16:55:00 +01:00
14 lines
No EOL
440 B
Bash
Executable file
14 lines
No EOL
440 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
|
|
|
if docker container inspect nginx > /dev/null 2>&1 ;
|
|
then
|
|
echo "nginx container exists already..."
|
|
else
|
|
docker run -d -p 80:80 -p 443:443 --restart=always --name nginx \
|
|
-v "$SCRIPT_DIR/nginx.conf:/etc/nginx/nginx.conf:ro" \
|
|
-v "/etc/letsencrypt:/etc/nginx/certs" \
|
|
--net internal \
|
|
nginx:latest
|
|
fi |