From 391ba242b38598ab2be4d9c114bc24d223db3c86 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Tue, 7 Sep 2021 08:19:43 +0000 Subject: [PATCH] updating docker build procedures --- codepot/docker/Dockerfile.ubnt2004 | 2 +- codepot/docker/apache2-fg.sh | 3 +++ codepot/docker/build-ubnt2004.sh | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/codepot/docker/Dockerfile.ubnt2004 b/codepot/docker/Dockerfile.ubnt2004 index 104c15f0..6a486f14 100644 --- a/codepot/docker/Dockerfile.ubnt2004 +++ b/codepot/docker/Dockerfile.ubnt2004 @@ -2,7 +2,7 @@ FROM ubuntu:20.04 RUN apt update && \ DEBIAN_FRONTEND=noninteractive apt install -y --no-install-recommends \ - subversion mariadb-server mariadb-client apache2 \ + subversion apache2 \ php libapache2-mod-php php-gd php-sqlite3 \ libapache2-mod-perl2 libapache2-mod-svn \ libswitch-perl libconfig-simple-perl libdigest-sha-perl \ diff --git a/codepot/docker/apache2-fg.sh b/codepot/docker/apache2-fg.sh index 6c49e407..3e32fd3d 100755 --- a/codepot/docker/apache2-fg.sh +++ b/codepot/docker/apache2-fg.sh @@ -37,6 +37,7 @@ for e in "${!APACHE_@}"; do fi done + [ ! -d /var/lib/codepot/attachments ] && mkdir -p /var/lib/codepot/attachments [ ! -d /var/lib/codepot/files ] && mkdir -p /var/lib/codepot/files [ ! -d /var/lib/codepot/issuefiles ] && mkdir -p /var/lib/codepot/issuefiles @@ -47,6 +48,8 @@ done mkdir -p /var/cache/codepot /var/log/codepot chown -R www-data:www-data /var/lib/codepot /var/cache/codepot /var/log/codepot +[ ! -f /var/lib/codepot/codepot.ini ] && cp -pf /etc/codepot/codepot.ini /var/lib/codepot/codepot.ini +export CODEPOT_CONFIG_FILE=/var/lib/codepot/codepot.ini #httpd server in the foreground exec apache2 -DFOREGROUND "$@" diff --git a/codepot/docker/build-ubnt2004.sh b/codepot/docker/build-ubnt2004.sh index 41680d11..4020a4f9 100755 --- a/codepot/docker/build-ubnt2004.sh +++ b/codepot/docker/build-ubnt2004.sh @@ -2,7 +2,7 @@ cd /tmp #apt update && #DEBIAN_FRONTEND=noninteractive apt install -y --no-install-recommends \ -# subversion mariadb-server mariadb-client apache2 \ +# subversion apache2 \ # php libapache2-mod-php php-gd php-sqlite3 \ # libapache2-mod-perl2 libapache2-mod-svn \ # libswitch-perl libconfig-simple-perl libdigest-sha-perl \ @@ -23,7 +23,7 @@ cd codepot && \ --with-cachedir=/var/cache/codepot \ --with-phpextdir=`php-config --extension-dir` \ --with-phpextinidir=`php-config --ini-dir | sed 's|/cli/|/apache2/|g'` && \ -make && make install && \ +make && make install && rm -rf /var/lib/codepot/* && \ sed -ri -e 's|^database_hostname[[:space:]]*=[[:space:]]*"localhost"$|database_hostname = "/var/lib/codepot/codepot.db"|g' \ -e 's|^database_driver[[:space:]]*=[[:space:]]*""$|database_driver = "sqlite"|g' \ -e 's|^database_use_pdo[[:space:]]*=[[:space:]]*"no"$|database_use_pdo = "yes"|g' /etc/codepot/codepot.ini && \