28 lines
1.1 KiB
Docker
28 lines
1.1 KiB
Docker
# Piwigo Docker Image
|
|
# Based on official Piwigo image with optimizations for restore
|
|
|
|
FROM piwigo/piwigo:latest
|
|
|
|
# Install additional tools for maintenance (Alpine uses apk)
|
|
RUN apk add --no-cache \
|
|
mariadb-client \
|
|
rsync
|
|
|
|
# Set recommended PHP settings
|
|
RUN mkdir -p /usr/local/etc/php/conf.d && \
|
|
echo 'memory_limit = 512M' > /usr/local/etc/php/conf.d/piwigo-custom.ini && \
|
|
echo 'max_execution_time = 300' >> /usr/local/etc/php/conf.d/piwigo-custom.ini && \
|
|
echo 'upload_max_filesize = 100M' >> /usr/local/etc/php/conf.d/piwigo-custom.ini && \
|
|
echo 'post_max_size = 100M' >> /usr/local/etc/php/conf.d/piwigo-custom.ini && \
|
|
echo 'max_file_uploads = 50' >> /usr/local/etc/php/conf.d/piwigo-custom.ini
|
|
|
|
# Create directory structure
|
|
RUN mkdir -p /var/www/html/upload /var/www/html/local/config /var/www/html/galleries \
|
|
&& chown -R www-data:www-data /var/www/html
|
|
|
|
# Copy custom entrypoint for restore support
|
|
COPY docker-entrypoint.sh /usr/local/bin/
|
|
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
|
|
|
|
ENTRYPOINT ["docker-entrypoint.sh"]
|
|
CMD ["apache2-foreground"] |