Compare commits

..

22 Commits
1.1.1 ... 1.1.2

Author SHA1 Message Date
b14804cac7 Version bump 2018-05-09 09:59:39 +10:00
ef5c2c53e3 Updated readme 2018-05-09 09:52:43 +10:00
f86e91bef2 Updated vulnerable dependancy 2018-05-09 09:47:51 +10:00
f4544778a7 Updated vulnerable package 2018-05-09 09:36:47 +10:00
6647c4cbb6 Added docker experimental features 2018-05-08 10:37:26 +10:00
a892f0688e Updated s6-overlay 2018-05-08 08:30:33 +10:00
3612c25ada Fix CI 2018-05-04 14:03:29 +10:00
a66c96ef1b Fix CI 2018-05-04 11:41:50 +10:00
b9c940efa8 Fix CI 2018-05-04 11:38:52 +10:00
2900a0b9e4 Fix CI pipeline 2018-05-04 00:13:36 +10:00
a38da77356 Fix CI pipeline 2018-05-04 00:05:29 +10:00
f1c86a7d49 Fix CI pipeline 2018-05-03 23:46:03 +10:00
4bb63fcf8d Fix CI pipeline 2018-05-03 17:03:34 +10:00
dba7f964d2 Fix CI pipeline 2018-05-03 16:57:10 +10:00
eaf0d27a3b Fix CI pipeline 2018-05-03 16:10:36 +10:00
2d69f287b7 Fix CI pipeline 2018-05-03 16:07:34 +10:00
e1aa975987 Fix CI pipeline 2018-05-03 16:03:53 +10:00
074a8377a3 Fix CI pipeline 2018-05-03 16:00:29 +10:00
c7852125a8 Fix CI pipeline 2018-05-03 15:56:35 +10:00
31ab201175 Added CI pipeline 2018-05-03 15:43:04 +10:00
ab1c5ad382 Added metadata to dockerfile 2018-04-16 12:10:12 +10:00
6428423274 Fix bug with ssl renew 2018-03-18 11:26:15 +10:00
9 changed files with 103 additions and 10029 deletions

View File

@ -1,5 +1,8 @@
FROM jc21/nginx-proxy-manager-base
MAINTAINER Jamie Curnow <jc@jc21.com>
LABEL maintainer="Jamie Curnow <jc@jc21.com>"
ENV SUPPRESS_NO_CONFIG_WARNING=1
ENV S6_FIX_ATTRS_HIDDEN=1
RUN echo "fs.file-max = 65535" > /etc/sysctl.conf
@ -8,7 +11,7 @@ RUN echo "fs.file-max = 65535" > /etc/sysctl.conf
COPY rootfs /
# s6 overlay
RUN curl -L -o /tmp/s6-overlay-amd64.tar.gz "https://github.com/just-containers/s6-overlay/releases/download/v1.21.2.1/s6-overlay-amd64.tar.gz" \
RUN curl -L -o /tmp/s6-overlay-amd64.tar.gz "https://github.com/just-containers/s6-overlay/releases/download/v1.21.4.0/s6-overlay-amd64.tar.gz" \
&& tar xzf /tmp/s6-overlay-amd64.tar.gz -C /
# App

68
Jenkinsfile vendored Normal file
View File

@ -0,0 +1,68 @@
pipeline {
options {
buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '10'))
disableConcurrentBuilds()
}
agent any
environment {
IMAGE_NAME = "nginx-proxy-manager"
TEMP_IMAGE_NAME = "nginx-proxy-manager-build_${BUILD_NUMBER}"
TAG_VERSION = getPackageVersion()
}
stages {
stage('Prepare') {
steps {
sh 'docker pull jc21/$IMAGE_NAME-base'
sh 'docker pull $DOCKER_CI_TOOLS'
}
}
stage('Build') {
steps {
sh 'docker run --rm -v $(pwd)/manager:/srv/manager -w /srv/manager jc21/$IMAGE_NAME-base yarn --registry=$NPM_REGISTRY install'
sh 'docker run --rm -v $(pwd)/manager:/srv/manager -w /srv/manager jc21/$IMAGE_NAME-base gulp build'
sh 'rm -rf node_modules'
sh 'docker run --rm -v $(pwd)/manager:/srv/manager -w /srv/manager jc21/$IMAGE_NAME-base yarn --registry=$NPM_REGISTRY install --prod'
sh 'docker run --rm -v $(pwd)/manager:/data $DOCKER_CI_TOOLS node-prune'
sh 'docker build --squash --compress -t $TEMP_IMAGE_NAME .'
}
}
stage('Publish') {
when {
branch 'master'
}
steps {
sh 'docker tag $TEMP_IMAGE_NAME ${DOCKER_PRIVATE_REGISTRY}/$IMAGE_NAME:latest'
sh 'docker push ${DOCKER_PRIVATE_REGISTRY}/$IMAGE_NAME:latest'
sh 'docker tag $TEMP_IMAGE_NAME ${DOCKER_PRIVATE_REGISTRY}/$IMAGE_NAME:$TAG_VERSION'
sh 'docker push ${DOCKER_PRIVATE_REGISTRY}/$IMAGE_NAME:$TAG_VERSION'
sh 'docker tag $TEMP_IMAGE_NAME docker.io/jc21/$IMAGE_NAME:latest'
sh 'docker tag $TEMP_IMAGE_NAME docker.io/jc21/$IMAGE_NAME:$TAG_VERSION'
withCredentials([usernamePassword(credentialsId: 'jc21-dockerhub', passwordVariable: 'dpass', usernameVariable: 'duser')]) {
sh "docker login -u '${duser}' -p '$dpass'"
sh 'docker push docker.io/jc21/$IMAGE_NAME:latest'
sh 'docker push docker.io/jc21/$IMAGE_NAME:$TAG_VERSION'
}
}
}
}
triggers {
bitbucketPush()
}
post {
success {
slackSend color: "#72c900", message: "SUCCESS: <${BUILD_URL}|${JOB_NAME}> build #${BUILD_NUMBER} - ${currentBuild.durationString}"
}
failure {
slackSend color: "#d61111", message: "FAILED: <${BUILD_URL}|${JOB_NAME}> build #${BUILD_NUMBER} - ${currentBuild.durationString}"
}
always {
sh 'docker rmi $TEMP_IMAGE_NAME'
}
}
}
def getPackageVersion() {
ver = sh(script: 'docker run --rm -v $(pwd)/manager:/data $DOCKER_CI_TOOLS bash -c "cat /data/package.json|jq -r \'.version\'"', returnStdout: true)
return ver.trim()
}

View File

@ -2,11 +2,9 @@
# Nginx Proxy Manager
![Version](https://img.shields.io/badge/version-1.1.1-green.svg)
![Stars](https://img.shields.io/docker/stars/jc21/nginx-proxy-manager.svg)
![Pulls](https://img.shields.io/docker/pulls/jc21/nginx-proxy-manager.svg)
![Build Status](http://bamboo.jc21.com/plugins/servlet/wittified/build-status/AB-NPM)
![Version](https://img.shields.io/badge/version-1.1.2-green.svg?style=for-the-badge)
![Stars](https://img.shields.io/docker/stars/jc21/nginx-proxy-manager.svg?style=for-the-badge)
![Pulls](https://img.shields.io/docker/pulls/jc21/nginx-proxy-manager.svg?style=for-the-badge)
This project comes as a pre-built docker image that enables you to easily forward to your websites
running at home or otherwise, including free SSL, without having to know too much about Nginx or Letsencrypt.

View File

@ -16,5 +16,5 @@ fi
cd "$CODEBASE"
docker-compose run --no-deps --rm -w /srv/manager app gulp $@
/usr/local/bin/docker-compose run --no-deps --rm -w /srv/manager app gulp $@
exit $?

View File

@ -16,5 +16,5 @@ fi
cd "$CODEBASE"
docker-compose run --no-deps --rm -w /srv/manager app npm $@
/usr/local/bin/docker-compose run --no-deps --rm -w /srv/manager app npm $@
exit $?

20
bin/yarn Executable file
View File

@ -0,0 +1,20 @@
#!/bin/bash
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
if hash realpath 2>/dev/null; then
export CODEBASE=$(realpath $SCRIPT_DIR/..)
elif hash grealpath 2>/dev/null; then
export CODEBASE=$(grealpath $SCRIPT_DIR/..)
else
export CODEBASE=$(readlink -e $SCRIPT_DIR/..)
fi
if [ -z "$CODEBASE" ]; then
echo "Unable to determine absolute codebase directory"
exit 1
fi
cd "$CODEBASE"
/usr/local/bin/docker-compose run --no-deps --rm -w /srv/manager app yarn $@
exit $?

10016
manager/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{
"name": "nginx-proxy-manager",
"version": "1.1.1",
"version": "1.1.2",
"description": "Nginx proxt with built in Web based management",
"main": "src/backend/index.js",
"dependencies": {
@ -38,7 +38,7 @@
"gulp-concat-util": "^0.5.5",
"gulp-ejs": "^3.0.1",
"gulp-imagemin": "^3.3.0",
"gulp-sass": "^3.1.0",
"gulp-sass": "^4.0.1",
"gulp-util": "^3.0.8",
"image-size": "^0.6.1",
"jquery": "^3.2.1",

View File

@ -26,13 +26,14 @@ const internalSsl = {
processExpiringHosts: () => {
if (!internalSsl.interval_processing) {
logger.info('Renewing SSL certs close to expiry...');
return utils.exec('/usr/bin/certbot renew --webroot=/config/letsencrypt-acme-challenge')
return utils.exec('/usr/bin/certbot renew -q')
.then(result => {
logger.info(result);
internalSsl.interval_processing = false;
return internalNginx.reload()
.then(() => {
logger.info('Renew Complete');
return result;
});
})
@ -59,7 +60,7 @@ const internalSsl = {
requestSsl: host => {
logger.info('Requesting SSL certificates for ' + host.hostname);
return utils.exec('/usr/bin/letsencrypt certonly --agree-tos --email "' + host.letsencrypt_email + '" -n -a webroot --webroot-path=/config/letsencrypt-acme-challenge -d "' + host.hostname + '"')
return utils.exec('/usr/bin/letsencrypt certonly --agree-tos --email "' + host.letsencrypt_email + '" -n -a webroot -d "' + host.hostname + '"')
.then(result => {
logger.info(result);
return result;
@ -73,7 +74,7 @@ const internalSsl = {
renewSsl: host => {
logger.info('Renewing SSL certificates for ' + host.hostname);
return utils.exec('/usr/bin/certbot renew --force-renewal --disable-hook-validation --webroot-path=/config/letsencrypt-acme-challenge --cert-name "' + host.hostname + '"')
return utils.exec('/usr/bin/certbot renew --force-renewal --disable-hook-validation --cert-name "' + host.hostname + '"')
.then(result => {
logger.info(result);
return result;