From ce71447928c623d6edab9545c4b2d7d53a6bf5b6 Mon Sep 17 00:00:00 2001 From: Disassembler Date: Thu, 13 Sep 2018 13:22:15 +0200 Subject: [PATCH] LXCize KanBoard build --- kanboard/Dockerfile | 43 ----------------- kanboard/{docker => lxc}/etc/nginx/nginx.conf | 0 .../{docker => lxc}/etc/php7/php-fpm.conf | 0 .../etc/services.d/.s6-svscan/finish | 0 .../{docker => lxc}/etc/services.d/nginx/run | 0 .../etc/services.d/php-fpm/run | 0 kanboard/lxcfile | 48 +++++++++++++++++++ kanboard/{build.sh => setup.sh} | 0 kanboard/{ => setup}/adminpwd.sql | 0 kanboard/{ => setup}/createdb.sql | 0 kanboard/{ => setup}/etc/init.d/kanboard | 0 .../{ => setup}/etc/periodic/daily/kanboard | 0 .../{ => setup}/srv/kanboard/conf/config.php | 0 13 files changed, 48 insertions(+), 43 deletions(-) delete mode 100644 kanboard/Dockerfile rename kanboard/{docker => lxc}/etc/nginx/nginx.conf (100%) rename kanboard/{docker => lxc}/etc/php7/php-fpm.conf (100%) rename kanboard/{docker => lxc}/etc/services.d/.s6-svscan/finish (100%) rename kanboard/{docker => lxc}/etc/services.d/nginx/run (100%) rename kanboard/{docker => lxc}/etc/services.d/php-fpm/run (100%) create mode 100644 kanboard/lxcfile rename kanboard/{build.sh => setup.sh} (100%) rename kanboard/{ => setup}/adminpwd.sql (100%) rename kanboard/{ => setup}/createdb.sql (100%) rename kanboard/{ => setup}/etc/init.d/kanboard (100%) rename kanboard/{ => setup}/etc/periodic/daily/kanboard (100%) rename kanboard/{ => setup}/srv/kanboard/conf/config.php (100%) diff --git a/kanboard/Dockerfile b/kanboard/Dockerfile deleted file mode 100644 index 310b65e..0000000 --- a/kanboard/Dockerfile +++ /dev/null @@ -1,43 +0,0 @@ -FROM php -LABEL maintainer="Disassembler " - -RUN \ - # Install runtime dependencies - apk --no-cache add php7-dom php7-iconv php7-openssl php7-pdo_pgsql php7-posix php7-simplexml php7-sockets php7-xml php7-zip php7-zlib - -RUN \ - # Install build dependencies - apk --no-cache add --virtual .deps git \ - # Download KanBoard - && wget https://github.com/kanboard/kanboard/archive/v1.2.5.zip -O /srv/kanboard.zip \ - && unzip /srv/kanboard.zip -d /srv \ - && mv /srv/kanboard-1.2.5 /srv/kanboard \ - # Install plugins - && git clone --depth=1 https://github.com/BlueTeck/kanboard_plugin_overwrite_translation /srv/kanboard/plugins/Overwrite_translation \ - && git clone --depth=1 https://github.com/BlueTeck/kanboard_plugin_coverimage /srv/kanboard/plugins/Coverimage \ - && git clone --depth=1 https://github.com/BlueTeck/kanboard_plugin_metadata /srv/kanboard/plugins/Metadata \ - && git clone --depth=1 https://github.com/eSkiSo/Subtaskdate /srv/kanboard/plugins/Subtaskdate \ - && git clone --depth=1 https://github.com/kanboard/plugin-budget /srv/kanboard/plugins/Budget \ - && git clone --depth=1 https://github.com/kanboard/plugin-calendar /srv/kanboard/plugins/Calendar \ - && git clone --depth=1 https://github.com/kanboard/plugin-chat /srv/kanboard/plugins/Chat \ - && git clone --depth=1 https://github.com/kanboard/plugin-gantt /srv/kanboard/plugins/Gantt \ - && git clone --depth=1 https://github.com/kanboard/plugin-gravatar /srv/kanboard/plugins/Gravatar \ - && git clone --depth=1 https://github.com/kanboard/plugin-registration /srv/kanboard/plugins/Registration \ - && git clone --depth=1 https://github.com/kanboard/plugin-sms-2fa /srv/kanboard/plugins/SmsTwoFactor \ - && git clone --depth=1 https://github.com/kanboard/plugin-task-board-date /srv/kanboard/plugins/TaskBoardDate \ - && git clone --depth=1 https://github.com/oliviermaridat/kanboard-milestone-plugin /srv/kanboard/plugins/Milestone \ - && git clone --depth=1 https://github.com/xavividal/kanboard-plugin-relationgraph /srv/kanboard/plugins/Relationgraph \ - # Create OS user - && addgroup -S -g 8009 kanboard \ - && adduser -S -u 8009 -h /srv/kanboard -s /bin/false -g kanboard -G kanboard kanboard \ - # Cleanup - && apk --no-cache del .deps \ - && rm -f /srv/kanboard.zip \ - && find /srv/kanboard -name '.git*' -exec rm -rf {} + - -COPY docker/ / - -VOLUME ["/srv/kanboard/data/files"] -EXPOSE 8080 - -CMD ["s6-svscan", "/etc/services.d"] diff --git a/kanboard/docker/etc/nginx/nginx.conf b/kanboard/lxc/etc/nginx/nginx.conf similarity index 100% rename from kanboard/docker/etc/nginx/nginx.conf rename to kanboard/lxc/etc/nginx/nginx.conf diff --git a/kanboard/docker/etc/php7/php-fpm.conf b/kanboard/lxc/etc/php7/php-fpm.conf similarity index 100% rename from kanboard/docker/etc/php7/php-fpm.conf rename to kanboard/lxc/etc/php7/php-fpm.conf diff --git a/kanboard/docker/etc/services.d/.s6-svscan/finish b/kanboard/lxc/etc/services.d/.s6-svscan/finish similarity index 100% rename from kanboard/docker/etc/services.d/.s6-svscan/finish rename to kanboard/lxc/etc/services.d/.s6-svscan/finish diff --git a/kanboard/docker/etc/services.d/nginx/run b/kanboard/lxc/etc/services.d/nginx/run similarity index 100% rename from kanboard/docker/etc/services.d/nginx/run rename to kanboard/lxc/etc/services.d/nginx/run diff --git a/kanboard/docker/etc/services.d/php-fpm/run b/kanboard/lxc/etc/services.d/php-fpm/run similarity index 100% rename from kanboard/docker/etc/services.d/php-fpm/run rename to kanboard/lxc/etc/services.d/php-fpm/run diff --git a/kanboard/lxcfile b/kanboard/lxcfile new file mode 100644 index 0000000..b27353e --- /dev/null +++ b/kanboard/lxcfile @@ -0,0 +1,48 @@ +IMAGE kanboard +LAYER shared/alpine +LAYER shared/php +LAYER kanboard/kanboard + +RUN EOF + # Install runtime dependencies + apk --no-cache add php7-dom php7-iconv php7-openssl php7-pdo_pgsql php7-posix php7-simplexml php7-sockets php7-xml php7-zip php7-zlib + + # Install build dependencies + apk --no-cache add --virtual .deps git + + # Download KanBoard + wget https://github.com/kanboard/kanboard/archive/v1.2.5.zip -O /srv/kanboard.zip + unzip /srv/kanboard.zip -d /srv + mv /srv/kanboard-1.2.5 /srv/kanboard + + # Install plugins + git clone --depth=1 https://github.com/BlueTeck/kanboard_plugin_overwrite_translation /srv/kanboard/plugins/Overwrite_translation + git clone --depth=1 https://github.com/BlueTeck/kanboard_plugin_coverimage /srv/kanboard/plugins/Coverimage + git clone --depth=1 https://github.com/BlueTeck/kanboard_plugin_metadata /srv/kanboard/plugins/Metadata + git clone --depth=1 https://github.com/eSkiSo/Subtaskdate /srv/kanboard/plugins/Subtaskdate + git clone --depth=1 https://github.com/kanboard/plugin-budget /srv/kanboard/plugins/Budget + git clone --depth=1 https://github.com/kanboard/plugin-calendar /srv/kanboard/plugins/Calendar + git clone --depth=1 https://github.com/kanboard/plugin-chat /srv/kanboard/plugins/Chat + git clone --depth=1 https://github.com/kanboard/plugin-gantt /srv/kanboard/plugins/Gantt + git clone --depth=1 https://github.com/kanboard/plugin-gravatar /srv/kanboard/plugins/Gravatar + git clone --depth=1 https://github.com/kanboard/plugin-registration /srv/kanboard/plugins/Registration + git clone --depth=1 https://github.com/kanboard/plugin-sms-2fa /srv/kanboard/plugins/SmsTwoFactor + git clone --depth=1 https://github.com/kanboard/plugin-task-board-date /srv/kanboard/plugins/TaskBoardDate + git clone --depth=1 https://github.com/oliviermaridat/kanboard-milestone-plugin /srv/kanboard/plugins/Milestone + git clone --depth=1 https://github.com/xavividal/kanboard-plugin-relationgraph /srv/kanboard/plugins/Relationgraph + + # Create OS user + addgroup -S -g 8009 kanboard + adduser -S -u 8009 -h /srv/kanboard -s /bin/false -g kanboard -G kanboard kanboard + + # Cleanup + apk --no-cache del .deps + rm -f /srv/kanboard.zip + find /srv/kanboard -name '.git*' -exec rm -rf {} + +EOF + +COPY lxc + +MOUNT /srv/kanboard/data srv/kanboard/data/files + +CMD /bin/s6-svscan /etc/services.d diff --git a/kanboard/build.sh b/kanboard/setup.sh similarity index 100% rename from kanboard/build.sh rename to kanboard/setup.sh diff --git a/kanboard/adminpwd.sql b/kanboard/setup/adminpwd.sql similarity index 100% rename from kanboard/adminpwd.sql rename to kanboard/setup/adminpwd.sql diff --git a/kanboard/createdb.sql b/kanboard/setup/createdb.sql similarity index 100% rename from kanboard/createdb.sql rename to kanboard/setup/createdb.sql diff --git a/kanboard/etc/init.d/kanboard b/kanboard/setup/etc/init.d/kanboard similarity index 100% rename from kanboard/etc/init.d/kanboard rename to kanboard/setup/etc/init.d/kanboard diff --git a/kanboard/etc/periodic/daily/kanboard b/kanboard/setup/etc/periodic/daily/kanboard similarity index 100% rename from kanboard/etc/periodic/daily/kanboard rename to kanboard/setup/etc/periodic/daily/kanboard diff --git a/kanboard/srv/kanboard/conf/config.php b/kanboard/setup/srv/kanboard/conf/config.php similarity index 100% rename from kanboard/srv/kanboard/conf/config.php rename to kanboard/setup/srv/kanboard/conf/config.php