From 185dabdab375f5d041da5781e4c5ea0c72f1a898 Mon Sep 17 00:00:00 2001 From: thelamer Date: Thu, 19 Dec 2019 16:23:20 -0800 Subject: [PATCH 1/2] Rebasing to Alpine 3.11 --- Dockerfile | 2 +- Dockerfile.aarch64 | 2 +- Dockerfile.armhf | 2 +- readme-vars.yml | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 78d2251..aabe386 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM lsiobase/nginx:3.10 +FROM lsiobase/nginx:3.11 # set version label ARG BUILD_DATE diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 1bca3a1..3ff0607 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -1,4 +1,4 @@ -FROM lsiobase/nginx:arm64v8-3.10 +FROM lsiobase/nginx:arm64v8-3.11 # set version label ARG BUILD_DATE diff --git a/Dockerfile.armhf b/Dockerfile.armhf index 54b715f..6ea2e6c 100644 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -1,4 +1,4 @@ -FROM lsiobase/nginx:arm32v7-3.10 +FROM lsiobase/nginx:arm32v7-3.11 # set version label ARG BUILD_DATE diff --git a/readme-vars.yml b/readme-vars.yml index 22c33a7..89e9594 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -100,6 +100,7 @@ app_setup_block: | # changelog changelogs: + - { date: "19.12.19:", desc: "Rebasing to alpine 3.11." } - { date: "26.07.19:", desc: "Use old version of tidyhtml pending upstream fixes." } - { date: "28.06.19:", desc: "Rebasing to alpine 3.10." } - { date: "14.06.19:", desc: "Add wkhtmltopdf to image for PDF rendering." } From 4f61df3b9afed0cd03a0dfeadcd6635698f073fc Mon Sep 17 00:00:00 2001 From: thelamer Date: Fri, 20 Dec 2019 08:34:52 -0800 Subject: [PATCH 2/2] adding working gaurd and ci run concept that just starts the nginx process skipping mysql stuff --- Jenkinsfile | 6 ++---- jenkins-vars.yml | 6 ++---- root/etc/cont-init.d/50-config | 10 +++++----- 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index ee544bd..b6afdfc 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -29,13 +29,11 @@ pipeline { DIST_IMAGE = 'alpine' MULTIARCH = 'true' CI = 'true' - CI_WEB = 'true' + CI_WEB = 'false' CI_PORT = '80' CI_SSL = 'false' CI_DELAY = '120' - TEST_MYSQL_HOST = credentials('mysql_test_host') - TEST_MYSQL_PASSWORD = credentials('mysql_test_password') - CI_DOCKERENV = 'DB_HOST=${TEST_MYSQL_HOST}|DB_DATABASE=bookstack|DB_USERNAME=root|DB_PASSWORD=${TEST_MYSQL_PASSWORD}' + CI_DOCKERENV = 'CI_RUN=true' CI_AUTH = 'user:password' CI_WEBPATH = '' } diff --git a/jenkins-vars.yml b/jenkins-vars.yml index eba19fa..d890be9 100644 --- a/jenkins-vars.yml +++ b/jenkins-vars.yml @@ -20,12 +20,10 @@ repo_vars: - DIST_IMAGE = 'alpine' - MULTIARCH = 'true' - CI = 'true' - - CI_WEB = 'true' + - CI_WEB = 'false' - CI_PORT = '80' - CI_SSL = 'false' - CI_DELAY = '120' - - TEST_MYSQL_HOST = credentials('mysql_test_host') - - TEST_MYSQL_PASSWORD = credentials('mysql_test_password') - - CI_DOCKERENV = 'DB_HOST=${TEST_MYSQL_HOST}|DB_DATABASE=bookstack|DB_USERNAME=root|DB_PASSWORD=${TEST_MYSQL_PASSWORD}' + - CI_DOCKERENV = 'CI_RUN=true' - CI_AUTH = 'user:password' - CI_WEBPATH = '' diff --git a/root/etc/cont-init.d/50-config b/root/etc/cont-init.d/50-config index d48a6dd..6d21928 100644 --- a/root/etc/cont-init.d/50-config +++ b/root/etc/cont-init.d/50-config @@ -57,11 +57,9 @@ fi # check for the mysql endpoint for 30 seconds END=$((SECONDS+30)) -while [ ${SECONDS} -lt ${END} ] && [ "${DB_HOST}" ]; - do +while [ ${SECONDS} -lt ${END} ] && [ -n "${DB_HOST+x}" ]; do /usr/bin/nc -z ${DB_HOST} 3306 && \ - if [ ! -z "$(/usr/bin/nc -w1 ${DB_HOST} 3306)" ]; - then + if [ ! -z "$(/usr/bin/nc -w1 ${DB_HOST} 3306)" ]; then [ ! -z "${RUN}" ] && break RUN="RAN" # we sleep here again due to first run init on DB containers @@ -73,7 +71,9 @@ while [ ${SECONDS} -lt ${END} ] && [ "${DB_HOST}" ]; done # update database - will set up database if fresh, or, migrate existing -php /var/www/html/artisan migrate --force +if [ -z "${CI_RUN+x}" ]; then + php /var/www/html/artisan migrate --force +fi # set permissions chown -R abc:abc \