Commit 597c1c69 authored by Fabio Montefuscolo's avatar Fabio Montefuscolo

Merge branch 'tiki-wiki'

parents 68a9f699 24a0d699
FROM montefuscolo/php
MAINTAINER Fabio Montefuscolo <fabio.montefuscolo@gmail.com>
RUN curl -o tiki-wiki.tar.gz 'http://ufpr.dl.sourceforge.net/project/tikiwiki/Tiki_12.x_Altair/12.9/tiki-12.9.tar.gz'
RUN tar -C /var/www/html -zxvf tiki-wiki.tar.gz --strip 1 \
&& rm tiki-wiki.tar.gz
WORKDIR /var/www/html/
RUN { \
echo "<?php"; \
echo " \$db_tiki = getenv('TIKI_DB_DRIVER') ?: 'mysql';"; \
echo " \$dbversion_tiki = getenv('TIKI_DB_VERSION') ?: '12.9';"; \
echo " \$host_tiki = getenv('TIKI_DB_HOST') ?: 'db';"; \
echo " \$user_tiki = getenv('TIKI_DB_USER');"; \
echo " \$pass_tiki = getenv('TIKI_DB_PASS');"; \
echo " \$dbs_tiki = getenv('TIKI_DB_NAME') ?: 'tikiwiki';"; \
echo " \$client_charset = 'utf8';"; \
} > db/local.php
RUN /bin/bash htaccess.sh
RUN chown -R root:root /var \
&& find /var/www/html -type f -exec chmod 644 {} \; \
&& find /var/www/html -type d -exec chmod 755 {} \; \
&& chown -R www-data db \
&& chown -R www-data dump \
&& chown -R www-data img/wiki \
&& chown -R www-data img/wiki_up \
&& chown -R www-data img/trackers \
&& chown -R www-data modules/cache \
&& chown -R www-data styles \
&& chown -R www-data temp \
&& chown -R www-data temp/cache \
&& chown -R www-data templates \
&& chown -R www-data templates_c \
&& chown -R www-data whelp
COPY docker-entrypoint.sh /entrypoint.sh
VOLUME ["/var/www/html/files/", "/var/www/html/img/wiki/", "/var/www/html/img/wiki_up/", "/var/www/html/img/trackers/"]
EXPOSE 80 443
ENTRYPOINT ["/entrypoint.sh"]
CMD ["apache2-foreground"]
TikiWiki
========
TikiWiki is full featured content management system written in php. You can
find more useful information at http://tiki.org
Pulling
-------
Actually, no tags are being used to this container. The tiki version available
inside container is the LTS 12.9. You can pull like below.
```
docker pull montefuscolo/tiki-wiki
```
Running
-------
Some env varibles are provided to setup the database, but you can also mount
your configurations files inside conainer. The env vars and the default values
are listed below and the names are self explanatory.
```
TIKI_DB_DRIVER=mysql
TIKI_DB_VERSION=12.9
TIKI_DB_HOST='db'
TIKI_DB_USER
TIKI_DB_PASS
TIKI_DB_NAME=tikiwiki
```
Example to get a running container below.
```
docker run --rm --name tiki --link mariadb:db \
-e TIKI_DB_USER=tiki \
-e TIKI_DB_PASS=wiki \
-p 80:80 \
-d montefuscolo/tiki-wiki
```
#!/bin/bash
if [ "$OPCACHE" = "false" ];
then
echo "php_flag opcache.enable Off" >> /var/www/html/.htaccess
fi
exec "$@"
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment