Replace project name variable for service name
This commit is contained in:
+5
-5
@@ -5,7 +5,7 @@ SCRIPT_PATH=$( cd "$(dirname "$0")" ; pwd -P )
|
||||
IMAGE_NAME="jwilder/nginx-proxy"
|
||||
IMAGE_VERSION="latest"
|
||||
|
||||
PROJECT_NAME=nginx-proxy
|
||||
SERVICE_NAME=nginx-proxy
|
||||
|
||||
|
||||
source ${SCRIPT_PATH}/../common.shinc
|
||||
@@ -27,13 +27,13 @@ init() {
|
||||
|
||||
# Create the nginx-proxy container
|
||||
docker create \
|
||||
--name ${PROJECT_NAME} \
|
||||
--name ${SERVICE_NAME} \
|
||||
-v /var/run/docker.sock:/tmp/docker.sock:ro \
|
||||
--restart=unless-stopped \
|
||||
-p 80:80 \
|
||||
-p 443:443 \
|
||||
--net ${PROXY_NETWORK} \
|
||||
${PROJECT_NAME}:latest
|
||||
${SERVICE_NAME}:latest
|
||||
|
||||
[[ $? -ne 0 ]] && return 1
|
||||
|
||||
@@ -41,11 +41,11 @@ init() {
|
||||
}
|
||||
|
||||
fix() {
|
||||
local upperDir=$(docker inspect ${PROJECT_NAME} --format "{{.GraphDriver.Data.UpperDir}}")
|
||||
local upperDir=$(docker inspect ${SERVICE_NAME} --format "{{.GraphDriver.Data.UpperDir}}")
|
||||
[[ $? -ne 0 ]] && __err "Could not determine the nginx proxy filesystem path" && return 2
|
||||
|
||||
stop
|
||||
sudo rm $(docker inspect ${PROJECT_NAME} --format "{{.GraphDriver.Data.UpperDir}}")/etc/nginx/conf.d/default.conf
|
||||
sudo rm $(docker inspect ${SERVICE_NAME} --format "{{.GraphDriver.Data.UpperDir}}")/etc/nginx/conf.d/default.conf
|
||||
|
||||
if [[ $? -eq 0 ]]; then
|
||||
__success "Succesfully removed the nginx configuration, restart the container"
|
||||
|
||||
Reference in New Issue
Block a user