mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-08-06 09:23:38 +00:00
Allow users to compile own images. Clean up some things.
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -3,3 +3,4 @@
|
|||||||
._*
|
._*
|
||||||
.vscode
|
.vscode
|
||||||
certbot-help.txt
|
certbot-help.txt
|
||||||
|
frontend/images/*
|
11137
backend/package-lock.json
generated
Normal file
11137
backend/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -3,12 +3,13 @@
|
|||||||
|
|
||||||
# This file assumes that the frontend has been built using ./scripts/frontend-build
|
# This file assumes that the frontend has been built using ./scripts/frontend-build
|
||||||
|
|
||||||
FROM nginxproxymanager/nginx-full:certbot-node
|
FROM nginxproxymanager/nginx-full:local_certbot-node
|
||||||
|
|
||||||
ARG TARGETPLATFORM
|
ARG TARGETPLATFORM
|
||||||
ARG BUILD_VERSION
|
ARG BUILD_VERSION
|
||||||
ARG BUILD_COMMIT
|
ARG BUILD_COMMIT
|
||||||
ARG BUILD_DATE
|
ARG BUILD_DATE
|
||||||
|
ARG BASE_TAG
|
||||||
|
|
||||||
ENV SUPPRESS_NO_CONFIG_WARNING=1 \
|
ENV SUPPRESS_NO_CONFIG_WARNING=1 \
|
||||||
S6_FIX_ATTRS_HIDDEN=1 \
|
S6_FIX_ATTRS_HIDDEN=1 \
|
||||||
@@ -57,6 +58,6 @@ LABEL org.label-schema.schema-version="1.0" \
|
|||||||
org.label-schema.license="MIT" \
|
org.label-schema.license="MIT" \
|
||||||
org.label-schema.name="nginx-proxy-manager" \
|
org.label-schema.name="nginx-proxy-manager" \
|
||||||
org.label-schema.description="Docker container for managing Nginx proxy hosts with a simple, powerful interface " \
|
org.label-schema.description="Docker container for managing Nginx proxy hosts with a simple, powerful interface " \
|
||||||
org.label-schema.url="https://github.com/jc21/nginx-proxy-manager" \
|
org.label-schema.url="https://github.com/baudneo/nginx-proxy-manager" \
|
||||||
org.label-schema.vcs-url="https://github.com/jc21/nginx-proxy-manager.git" \
|
org.label-schema.vcs-url="https://github.com/baudneo/nginx-proxy-manager.git" \
|
||||||
org.label-schema.cmd="docker run --rm -ti jc21/nginx-proxy-manager:latest"
|
org.label-schema.cmd="docker run --rm -ti baudneo/nginx-proxy-manager:${BASE_TAG:-latest}"
|
||||||
|
@@ -9,16 +9,16 @@ log() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if [ "${CROWDSEC_BOUNCER}" == "1" ] || [ "${CROWDSEC_BOUNCER}" -eq 1 ]; then
|
if [ "${CROWDSEC_BOUNCER}" == "1" ] || [ "${CROWDSEC_BOUNCER}" -eq 1 ]; then
|
||||||
log "Enabling CrowdSec Bouncer"
|
log "Enabling CrowdSec OpenResty Bouncer"
|
||||||
mkdir -p /data/crowdsec
|
mkdir -p /data/crowdsec
|
||||||
#Install Crowdsec Bouncer Config.
|
|
||||||
if [ -f /data/crowdsec/crowdsec-openresty-bouncer.conf ]; then
|
if [ -f /data/crowdsec/crowdsec-openresty-bouncer.conf ]; then
|
||||||
cp /crowdsec/crowdsec-openresty-bouncer.conf /data/crowdsec/crowdsec-openresty-bouncer.conf
|
#Install Crowdsec Bouncer Config.
|
||||||
log "Crowdsec Bouncer Config copied to /data/crowdsec/crowdsec-openresty-bouncer.conf"
|
cp /crowdsec/crowdsec-openresty-bouncer.conf.template /data/crowdsec/crowdsec-openresty-bouncer.conf
|
||||||
|
log "Crowdsec OpenResty Bouncer Config copied to /data/crowdsec/crowdsec-openresty-bouncer.conf"
|
||||||
fi
|
fi
|
||||||
|
# Create lualib plugin directory for crowdsec and move crowdsec lua libs into it
|
||||||
mkdir -p /etc/nginx/lualib/plugins/crowdsec/
|
mkdir -p /etc/nginx/lualib/plugins/crowdsec/
|
||||||
cp /crowdsec/lua/* /etc/nginx/lualib/plugins/crowdsec/
|
cp /crowdsec/lua/* /etc/nginx/lualib/plugins/crowdsec/
|
||||||
|
# This initilizes crowdsec as /etc/nginx/conf.d/* is included in nginx.conf
|
||||||
cp /crowdsec/crowdsec_openresty.conf /etc/nginx/conf.d/
|
cp /crowdsec/crowdsec_openresty.conf /etc/nginx/conf.d/
|
||||||
sed-patch 's|ok, err = require "crowdsec".allowIp(ngx.var.remote_addr)|local ok, err = require "crowdsec".allowIp(ngx.var.remote_addr)|' /etc/nginx/lualib/plugins/crowdsec/access.lua
|
|
||||||
fi
|
fi
|
38
local-build.sh
Executable file
38
local-build.sh
Executable file
@@ -0,0 +1,38 @@
|
|||||||
|
#!/bin/bash -e
|
||||||
|
|
||||||
|
BLUE='\E[1;34m'
|
||||||
|
CYAN='\E[1;36m'
|
||||||
|
YELLOW='\E[1;33m'
|
||||||
|
GREEN='\E[1;32m'
|
||||||
|
RED='\E[1;31m'
|
||||||
|
RESET='\E[0m'
|
||||||
|
|
||||||
|
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
cd "${DIR}"
|
||||||
|
export DOCKER_IMAGE=baudneo/nginx-proxy-manager
|
||||||
|
export MAINTAINER="baudneo <baudneo@protonmail.com>"
|
||||||
|
export REPO_OWNER="baudneo"
|
||||||
|
export BASE_TAG='local_upgrade'
|
||||||
|
|
||||||
|
export TARGETPLATFORM=amd64
|
||||||
|
export BUILD_VERSION=dev
|
||||||
|
export BUILD_COMMIT=
|
||||||
|
export BUILD_DATE="$(date '+%Y-%m-%d %T %Z')"
|
||||||
|
export SSL_CERTS_PATH="/etc/ssl/certs/GTS_Root_R1.pem"
|
||||||
|
echo -e "${BLUE}❯ ${CYAN}Running ${RED}'scripts/frontend-build'${RESET}"
|
||||||
|
bash ./scripts/frontend-build
|
||||||
|
# Build
|
||||||
|
echo -e "${BLUE}❯ ${CYAN}Building Image [${DOCKER_IMAGE}] with tag: ${YELLOW}${BASE_TAG}${CYAN}...${RESET}"
|
||||||
|
docker build \
|
||||||
|
\
|
||||||
|
--build-arg BUILD_VERSION="${BUILD_VERSION:-dev}" \
|
||||||
|
--build-arg BUILD_COMMIT="${BUILD_COMMIT:-notset}" \
|
||||||
|
--build-arg BUILD_DATE="${BUILD_DATE}" \
|
||||||
|
--build-arg SSL_CERTS_PATH="${SSL_CERTS_PATH}" \
|
||||||
|
--build-arg BASE_TAG="${BASE_TAG}" \
|
||||||
|
-t ${DOCKER_IMAGE}:${BASE_TAG} \
|
||||||
|
-f docker/Dockerfile \
|
||||||
|
.
|
||||||
|
|
||||||
|
echo -e "${BLUE}❯ ${GREEN}All done!${RESET}"
|
||||||
|
|
Reference in New Issue
Block a user