updating docker build procedures

This commit is contained in:
hyung-hwan 2021-09-07 07:23:24 +00:00
parent 19b380cee0
commit 0f3a718b8f
2 changed files with 14 additions and 8 deletions

View File

@ -37,5 +37,16 @@ for e in "${!APACHE_@}"; do
fi fi
done done
# start the mysql service and run the httpd server in the foreground [ ! -d /var/lib/codepot/attachments ] && mkdir -p /var/lib/codepot/attachments
service mysql start && sleep 2 && exec apache2 -DFOREGROUND "$@" [ ! -d /var/lib/codepot/files ] && mkdir -p /var/lib/codepot/files
[ ! -d /var/lib/codepot/issuefiles ] && mkdir -p /var/lib/codepot/issuefiles
[ ! -d /var/lib/codepot/svnrepo ] && mkdir -p /var/lib/codepot/svnrepo
[ ! -d /var/lib/codepot/usericons ] && mkdir -p /var/lib/codepot/usericons
[ ! -f /var/lib/codepot/codepot.db ] && sqlite3 -init /etc/codepot/codepot.sqlite /var/lib/codepot/codepot.db ""
mkdir -p /var/cache/codepot /var/log/codepot
chown -R www-data:www-data /var/lib/codepot /var/cache/codepot /var/log/codepot
#httpd server in the foreground
exec apache2 -DFOREGROUND "$@"

View File

@ -24,18 +24,13 @@ cd codepot && \
--with-phpextdir=`php-config --extension-dir` \ --with-phpextdir=`php-config --extension-dir` \
--with-phpextinidir=`php-config --ini-dir | sed 's|/cli/|/apache2/|g'` && \ --with-phpextinidir=`php-config --ini-dir | sed 's|/cli/|/apache2/|g'` && \
make && make install && \ make && make install && \
mkdir -p /var/lib/codepot/svnrepo /var/lib/codepot/files && \
mkdir -p /var/cache/codepot /var/log/codepot && \
sqlite3 -init /etc/codepot/codepot.sqlite /var/lib/codepot/codepot.db "" && \
chown -R www-data:www-data /var/lib/codepot /var/cache/codepot /var/log/codepot && \
sed -ri -e 's|^database_hostname[[:space:]]*=[[:space:]]*"localhost"$|database_hostname = "/var/lib/codepot/codepot.db"|g' \ 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_driver[[:space:]]*=[[:space:]]*""$|database_driver = "sqlite"|g' \
-e 's|^database_use_pdo[[:space:]]*=[[:space:]]*"no"$|database_use_pdo = "yes"|g' /etc/codepot/codepot.ini && \ -e 's|^database_use_pdo[[:space:]]*=[[:space:]]*"no"$|database_use_pdo = "yes"|g' /etc/codepot/codepot.ini && \
sed -ri -e 's|Digest::SHA1|Digest::SHA|g' /usr/sbin/codepot-user && \ sed -ri -e 's|Digest::SHA1|Digest::SHA|g' /usr/sbin/codepot-user && \
sed -ri -e 's|Digest::SHA1|Digest::SHA|g' /etc/codepot/perl/Codepot/AccessHandler.pm && \ sed -ri -e 's|Digest::SHA1|Digest::SHA|g' /etc/codepot/perl/Codepot/AccessHandler.pm && \
install -m 0755 -D -t /usr/sbin docker/apache2-fg.sh && \ install -m 0755 -D -t /usr/sbin docker/apache2-fg.sh && \
cd .. && \ cd ../.. && \
cd .. && \
\ \
cp -pf /etc/codepot/codepot.httpd /etc/apache2/conf-enabled/codepot.conf && \ cp -pf /etc/codepot/codepot.httpd /etc/apache2/conf-enabled/codepot.conf && \
echo "PerlSwitches -Mlib=/etc/codepot/perl" >> /etc/apache2/conf-enabled/perl.conf echo "PerlSwitches -Mlib=/etc/codepot/perl" >> /etc/apache2/conf-enabled/perl.conf