Initial commit

This commit is contained in:
Arnie
2018-01-04 06:34:06 +01:00
parent 4cd30eea87
commit 524b9f1c0e
12 changed files with 542 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
ARG IMAGE_NAME
ARG IMAGE_VERSION
FROM ${IMAGE_NAME}:${IMAGE_VERSION}
COPY conf.d/ /etc/nginx/conf.d/
+4
View File
@@ -0,0 +1,4 @@
proxy_connect_timeout 300;
proxy_send_timeout 300;
proxy_read_timeout 300;
send_timeout 300;
+1
View File
@@ -0,0 +1 @@
client_max_body_size 2000m;
Executable
+58
View File
@@ -0,0 +1,58 @@
#!/usr/bin/env bash
SCRIPT_PATH=$( cd "$(dirname "$0")" ; pwd -P )
IMAGE_NAME="jwilder/nginx-proxy"
IMAGE_VERSION="latest"
PROJECT_NAME=nginx-proxy
source ${SCRIPT_PATH}/../common.shinc
#
# Project specific variables
#
init() {
__init
NETWORKS=(${PROXY_NETWORK})
__createNetworks
__build || return $?
# Create the nginx-proxy container
docker create \
--name ${PROJECT_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
[[ $? -ne 0 ]] && return 1
__ask_to_start
}
fix() {
local upperDir=$(docker inspect ${PROJECT_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
if [[ $? -eq 0 ]]; then
__success "Succesfully removed the nginx configuration, restart the container"
return 0
else
__err "Could not remove the configuration file"
return 1
fi
}
"$@"
exit $?