ADD: divided application and configuration directory
This commit is contained in:
parent
3d76ff1ca8
commit
270231759a
@ -11,9 +11,7 @@ RUN docker-php-ext-install gettext && docker-php-ext-enable gettext
|
|||||||
RUN docker-php-ext-install intl && docker-php-ext-enable intl
|
RUN docker-php-ext-install intl && docker-php-ext-enable intl
|
||||||
RUN docker-php-ext-install zip && docker-php-ext-enable zip
|
RUN docker-php-ext-install zip && docker-php-ext-enable zip
|
||||||
RUN docker-php-ext-install ldap && docker-php-ext-enable ldap
|
RUN docker-php-ext-install ldap && docker-php-ext-enable ldap
|
||||||
RUN wget -O wikindx.tar.bz2 https://phoenixnap.dl.sourceforge.net/project/wikindx/6.4.9/wikindx_6.4.9.tar.bz2
|
|
||||||
RUN tar jxf wikindx.tar.bz2
|
|
||||||
RUN cp wikindx/config.php.dist wikindx/config.php
|
|
||||||
COPY create.sql .
|
COPY create.sql .
|
||||||
COPY docker-entrypoint-wikindx /usr/local/bin/
|
COPY docker-entrypoint-wikindx /usr/local/bin/
|
||||||
RUN chown www-data.www-data wikindx -R
|
RUN chown www-data.www-data wikindx -R
|
||||||
@ -27,4 +25,9 @@ RUN echo "mysqli.default_socket = /var/run/mysqld/mysqld.sock" >> /usr/local/etc
|
|||||||
VOLUME ["/var/lib/mysql"]
|
VOLUME ["/var/lib/mysql"]
|
||||||
VOLUME ["/home/wikindx"]
|
VOLUME ["/home/wikindx"]
|
||||||
|
|
||||||
|
RUN mkdir /home/wikindx
|
||||||
|
WORKDIR /var/www/html
|
||||||
|
RUN wget -O wikindx.tar.bz2 https://phoenixnap.dl.sourceforge.net/project/wikindx/6.4.9/wikindx_6.4.9.tar.bz2
|
||||||
|
RUN tar jxf wikindx.tar.bz2
|
||||||
|
|
||||||
ENTRYPOINT ["docker-entrypoint-wikindx"]
|
ENTRYPOINT ["docker-entrypoint-wikindx"]
|
||||||
|
@ -7,8 +7,23 @@ if [ ! -d /var/lib/mysql/wikindx6 ] ; then
|
|||||||
mysql -u root < create.sql
|
mysql -u root < create.sql
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -d /var/www/html/wikindx ]; then
|
# for updating from old docker container
|
||||||
mv /home/wikindx /var/www/html/
|
if [ -d /home/wikindx/core ]; then
|
||||||
|
mv /home/wikindx/config.php /tmp/
|
||||||
|
rm /home/wikindx/* -rf
|
||||||
|
mv /tmp/config.php /home/wikindx/config.php
|
||||||
|
chown -R www-data.www-data /home/wikindx
|
||||||
|
fi
|
||||||
|
|
||||||
|
# make sure a configuration file exists
|
||||||
|
if [ ! -e /home/wikindx/config.php ]; then
|
||||||
|
cp /var/www/html/config.php.dist /home/wikindx/config.php
|
||||||
|
chown -R www-data.www-data /home/wikindx
|
||||||
|
fi
|
||||||
|
|
||||||
|
# make sure configuration file is linked to application directory
|
||||||
|
if [ ! -e /var/www/html/config.php ]; then
|
||||||
|
ln -s /home/wikindx/config.php /var/www/html/config.php
|
||||||
chown -R www-data.www-data /var/www/html/wikindx
|
chown -R www-data.www-data /var/www/html/wikindx
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user