mirror of
https://github.com/linuxserver/docker-bookstack.git
synced 2026-02-20 02:30:30 +08:00
adding working gaurd and ci run concept that just starts the nginx process skipping mysql stuff
This commit is contained in:
parent
185dabdab3
commit
4f61df3b9a
6
Jenkinsfile
vendored
6
Jenkinsfile
vendored
@ -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 = ''
|
||||
}
|
||||
|
||||
@ -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 = ''
|
||||
|
||||
@ -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 \
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user