2024-05-20 16:16:44 +02:00
|
|
|
FROM php:8.3.7-apache-bookworm
|
2023-01-28 15:28:34 +01:00
|
|
|
LABEL Maintainer="Libretic"
|
2024-05-20 16:16:44 +02:00
|
|
|
LABEL Description="Official Docker image for Paheko."
|
2023-01-28 15:28:34 +01:00
|
|
|
|
|
|
|
ENV APACHE_DOCUMENT_ROOT /var/www/paheko/www
|
|
|
|
|
|
|
|
# Required PHP extensions and packages
|
|
|
|
RUN apt-get update && \
|
|
|
|
apt-get install -y libicu-dev zlib1g-dev libpng-dev libzip-dev libfreetype6-dev libjpeg62-turbo-dev chromium && \
|
|
|
|
docker-php-ext-configure gd --with-freetype --with-jpeg && \
|
|
|
|
docker-php-ext-install -j$(nproc) gd intl zip opcache
|
|
|
|
|
2023-10-06 15:39:40 +02:00
|
|
|
# Enable Apache rewrite module
|
|
|
|
RUN a2enmod rewrite
|
|
|
|
|
2023-09-08 17:52:14 +02:00
|
|
|
ARG PAHEKO_VERSION
|
|
|
|
ENV PAHEKO_VERSION=$PAHEKO_VERSION
|
|
|
|
|
2023-01-28 15:28:34 +01:00
|
|
|
# Downloading and installing Paheko
|
|
|
|
RUN cd /var/www && \
|
|
|
|
curl -L -O https://fossil.kd2.org/paheko/uv/paheko-$PAHEKO_VERSION.tar.gz && \
|
|
|
|
tar xzvf paheko-$PAHEKO_VERSION.tar.gz && \
|
|
|
|
mv paheko-$PAHEKO_VERSION /var/www/paheko && \
|
|
|
|
chown -R www-data: /var/www/paheko && \
|
|
|
|
rm -f paheko-$PAHEKO_VERSION.tar.gz
|
|
|
|
|
|
|
|
# Downloading plugins
|
|
|
|
RUN cd /var/www/paheko/data/plugins/ && \
|
|
|
|
curl -L -O https://fossil.kd2.org/paheko-plugins/uv/stock_velos.tar.gz ; \
|
|
|
|
curl -L -O https://fossil.kd2.org/paheko-plugins/uv/reservations.tar.gz ; \
|
|
|
|
curl -L -O https://fossil.kd2.org/paheko-plugins/uv/webstats.tar.gz ; \
|
|
|
|
curl -L -O https://fossil.kd2.org/paheko-plugins/uv/git_documents.tar.gz ; \
|
|
|
|
curl -L -O https://fossil.kd2.org/paheko-plugins/uv/taima.tar.gz ; \
|
|
|
|
curl -L -O https://fossil.kd2.org/paheko-plugins/uv/caisse.tar.gz ; \
|
|
|
|
curl -L -O https://fossil.kd2.org/paheko-plugins/uv/helloasso.tar.gz ; \
|
|
|
|
chown -R www-data: /var/www/paheko/data/plugins
|
|
|
|
|
2023-10-06 15:39:40 +02:00
|
|
|
# Change apache documentroot
|
|
|
|
RUN sed -ri "s#/var/www/html#/var/www/paheko/www#g" /etc/apache2/sites-available/*.conf
|
|
|
|
RUN sed -ri -e "s#/var/www/#/var/www/paheko/www/#g" /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf
|
2023-01-28 15:28:34 +01:00
|
|
|
|
|
|
|
# Prepare .config dir for chromium
|
|
|
|
RUN mkdir /.config && \
|
|
|
|
chown -R www-data: /.config
|
|
|
|
|
2023-10-06 15:39:40 +02:00
|
|
|
# Prepare apache .htaccess and virtualhost
|
|
|
|
COPY .htaccess /var/www/paheko/www/
|
|
|
|
COPY 000-default.conf /etc/apache2/sites-available/000-default.conf
|
|
|
|
|
|
|
|
# Test apache responds to validate that everything is up&running
|
|
|
|
HEALTHCHECK --timeout=10s CMD curl --silent --fail http://127.0.0.1/admin/
|