updating docker build procedures
This commit is contained in:
parent
19b380cee0
commit
0f3a718b8f
@ -37,5 +37,16 @@ for e in "${!APACHE_@}"; do
|
||||
fi
|
||||
done
|
||||
|
||||
# start the mysql service and run the httpd server in the foreground
|
||||
service mysql start && sleep 2 && exec apache2 -DFOREGROUND "$@"
|
||||
[ ! -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
|
||||
[ ! -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 "$@"
|
||||
|
@ -24,18 +24,13 @@ cd codepot && \
|
||||
--with-phpextdir=`php-config --extension-dir` \
|
||||
--with-phpextinidir=`php-config --ini-dir | sed 's|/cli/|/apache2/|g'` && \
|
||||
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' \
|
||||
-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 && \
|
||||
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 && \
|
||||
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 && \
|
||||
echo "PerlSwitches -Mlib=/etc/codepot/perl" >> /etc/apache2/conf-enabled/perl.conf
|
||||
|
Loading…
Reference in New Issue
Block a user