converting to AWS image

This commit is contained in:
Nick Craig
2022-03-09 11:27:13 -05:00
parent f31692dbcb
commit 30c9a1fbbd
5 changed files with 31 additions and 24 deletions

12
Jenkinsfile vendored
View File

@@ -8,7 +8,7 @@ pipeline {
ansiColor('xterm')
}
environment {
IMAGE = "nginx-proxy-manager"
IMAGE = "owenscorning/aws-nginx-full"
BUILD_VERSION = getVersion()
MAJOR_VERSION = "2"
BRANCH_LOWER = "${BRANCH_NAME.toLowerCase().replaceAll('/', '-')}"
@@ -26,7 +26,7 @@ pipeline {
}
steps {
script {
env.BUILDX_PUSH_TAGS = "-t docker.io/jc21/${IMAGE}:${BUILD_VERSION} -t docker.io/jc21/${IMAGE}:${MAJOR_VERSION} -t docker.io/jc21/${IMAGE}:latest"
env.BUILDX_PUSH_TAGS = "-t docker.io/${IMAGE}:${BUILD_VERSION} -t docker.io/${IMAGE}:${MAJOR_VERSION} -t docker.io/${IMAGE}:latest"
}
}
}
@@ -39,7 +39,7 @@ pipeline {
steps {
script {
// Defaults to the Branch name, which is applies to all branches AND pr's
env.BUILDX_PUSH_TAGS = "-t docker.io/jc21/${IMAGE}:github-${BRANCH_LOWER}"
env.BUILDX_PUSH_TAGS = "-t docker.io/${IMAGE}:github-${BRANCH_LOWER}"
}
}
}
@@ -62,13 +62,13 @@ pipeline {
stage('Backend') {
steps {
echo 'Checking Syntax ...'
sh 'docker pull nginxproxymanager/nginx-full:certbot-node'
sh 'docker pull ${IMAGE}:certbot-node'
// See: https://github.com/yarnpkg/yarn/issues/3254
sh '''docker run --rm \\
-v "$(pwd)/backend:/app" \\
-v "$(pwd)/global:/app/global" \\
-w /app \\
nginxproxymanager/nginx-full:certbot-node \\
${IMAGE}:certbot-node \\
sh -c "yarn install && yarn eslint . && rm -rf node_modules"
'''
@@ -214,7 +214,7 @@ pipeline {
}
steps {
script {
def comment = pullRequest.comment("This is an automated message from CI:\n\nDocker Image for build ${BUILD_NUMBER} is available on [DockerHub](https://cloud.docker.com/repository/docker/jc21/${IMAGE}) as `jc21/${IMAGE}:github-${BRANCH_LOWER}`\n\n**Note:** ensure you backup your NPM instance before testing this PR image! Especially if this PR contains database changes.")
def comment = pullRequest.comment("This is an automated message from CI:\n\nDocker Image for build ${BUILD_NUMBER} is available on [DockerHub](https://cloud.docker.com/repository/docker${IMAGE}) as `jc21/${IMAGE}:github-${BRANCH_LOWER}`\n\n**Note:** ensure you backup your NPM instance before testing this PR image! Especially if this PR contains database changes.")
}
}
}

View File

@@ -3,7 +3,7 @@
# This file assumes that the frontend has been built using ./scripts/frontend-build
FROM nginxproxymanager/nginx-full:certbot-node
FROM owenscorning/aws-nginx-full:certbot-node
ARG TARGETPLATFORM
ARG BUILD_VERSION
@@ -18,11 +18,12 @@ ENV SUPPRESS_NO_CONFIG_WARNING=1 \
NPM_BUILD_COMMIT="${BUILD_COMMIT}" \
NPM_BUILD_DATE="${BUILD_DATE}"
RUN echo "fs.file-max = 65535" > /etc/sysctl.conf \
&& apt-get update \
&& apt-get install -y --no-install-recommends jq logrotate \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN yum makecache \
&& yum install -y \
jq logrotate \
\
&& yum clean all \
&& rm -rf /var/cache/* /var/log/* /tmp/*
# s6 overlay
COPY scripts/install-s6 /tmp/install-s6
@@ -56,8 +57,9 @@ ENTRYPOINT [ "/init" ]
LABEL org.label-schema.schema-version="1.0" \
org.label-schema.license="MIT" \
org.label-schema.name="nginx-proxy-manager" \
org.label-schema.name="aws-nginx-full" \
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.vcs-url="https://github.com/jc21/nginx-proxy-manager.git" \
org.label-schema.cmd="docker run --rm -ti jc21/nginx-proxy-manager:latest"
org.label-schema.url="https://github.com/owenscorning/docker-aws-nginx-full" \
org.label-schema.vcs-url="https://github.com/owenscorning/docker-aws-nginx-full.git" \
org.label-schema.cmd="docker run --rm -ti owenscorning/aws-nginx-full:latest"

View File

@@ -1,15 +1,15 @@
FROM nginxproxymanager/nginx-full:certbot-node
LABEL maintainer="Jamie Curnow <jc@jc21.com>"
FROM owenscorning/aws-nginx-full:certbot-node
ENV S6_LOGGING=0 \
SUPPRESS_NO_CONFIG_WARNING=1 \
S6_FIX_ATTRS_HIDDEN=1
RUN echo "fs.file-max = 65535" > /etc/sysctl.conf \
&& apt-get update \
&& apt-get install -y certbot jq python3-pip logrotate \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN yum makecache \
&& yum install -y \
certbot jq python3-pip logrotate \
\
&& yum clean all \
&& rm -rf /var/cache/* /var/log/* /tmp/*
# Task
RUN cd /usr \

View File

@@ -168,3 +168,7 @@ $pink: #f66d9b;
textarea.form-control.text-monospace {
font-size: 12px;
}
/*wrapfix for table */
.table .text-monospace {
word-break: break-word;
}

View File

@@ -2,8 +2,9 @@
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
. "$DIR/.common.sh"
aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 413067109875.dkr.ecr.us-east-1.amazonaws.com
DOCKER_IMAGE=nginxproxymanager/nginx-full:certbot-node
DOCKER_IMAGE=413067109875.dkr.ecr.us-east-1.amazonaws.com/owenscorning/aws-nginx-full:certbot-node
# Ensure docker exists
if hash docker 2>/dev/null; then