You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pixelfed/Dockerfile

56 lines
1.1 KiB
Docker

Staging (#6343) * Prepared new docker * Docker setup improvements and fixes * Update DOCKER_SETUP.md * Update DOCKER_SETUP.md * Update DOCKER_SETUP.md * Update DOCKER_SETUP.md * Update DOCKER_SETUP.md * Update DOCKER_SETUP.md * Update .dockerignore * DB/Redis health check * updated health checks * updated install guide * updated DOCKER_SETUP * Updated DOCKER_SETUP * Updated DOCKER_SETUP * Update and rename DOCKER_SETUP.md to DOCKER_COMPOSE_SETUP.md * RemoveUnreachableStatementRector * Update GroupActivityPubService.php * Larastan: Add @property * Delete rector.php * more properties * 2fa_enabled needs to be refactored * Fix AdminUser.php syntax error - remove invalid property declaration * Update AdminUser.php * update * Upgrade predis from v2.0 to v3.2 - Update predis/predis from ^2.0 to ^3.2 - Predis v3.2.0 includes RESP3 support, improved pipeline abstractions - No code changes required, configuration remains compatible - Tested successfully with tinker * Upgrade predis from v2.0 to v3.2 * Update * Update .env.docker.example * Update DOCKER_COMPOSE_SETUP.md * Create ImageDriverManager.php * Update image.php * Update ImageResizePipeline.php * Update StoryComposeController.php * Update AvatarOptimize.php * Update Image.php * Update composer.json * Update AvatarOptimize.php * update lock * Update composer.lock * update * update * update * Allow to set new image types in admin interface * Update composer, fix deps * Update composer --------- Co-authored-by: Shlee <github@shl.ee> Co-authored-by: Your Name <you@example.com> Co-authored-by: Severin <savewish@icloud.com>
7 months ago
FROM serversideup/php:8.4-fpm-nginx
Staging (#6343) * Prepared new docker * Docker setup improvements and fixes * Update DOCKER_SETUP.md * Update DOCKER_SETUP.md * Update DOCKER_SETUP.md * Update DOCKER_SETUP.md * Update DOCKER_SETUP.md * Update DOCKER_SETUP.md * Update .dockerignore * DB/Redis health check * updated health checks * updated install guide * updated DOCKER_SETUP * Updated DOCKER_SETUP * Updated DOCKER_SETUP * Update and rename DOCKER_SETUP.md to DOCKER_COMPOSE_SETUP.md * RemoveUnreachableStatementRector * Update GroupActivityPubService.php * Larastan: Add @property * Delete rector.php * more properties * 2fa_enabled needs to be refactored * Fix AdminUser.php syntax error - remove invalid property declaration * Update AdminUser.php * update * Upgrade predis from v2.0 to v3.2 - Update predis/predis from ^2.0 to ^3.2 - Predis v3.2.0 includes RESP3 support, improved pipeline abstractions - No code changes required, configuration remains compatible - Tested successfully with tinker * Upgrade predis from v2.0 to v3.2 * Update * Update .env.docker.example * Update DOCKER_COMPOSE_SETUP.md * Create ImageDriverManager.php * Update image.php * Update ImageResizePipeline.php * Update StoryComposeController.php * Update AvatarOptimize.php * Update Image.php * Update composer.json * Update AvatarOptimize.php * update lock * Update composer.lock * update * update * update * Allow to set new image types in admin interface * Update composer, fix deps * Update composer --------- Co-authored-by: Shlee <github@shl.ee> Co-authored-by: Your Name <you@example.com> Co-authored-by: Severin <savewish@icloud.com>
7 months ago
# Set working directory
WORKDIR /var/www/html
Staging (#6343) * Prepared new docker * Docker setup improvements and fixes * Update DOCKER_SETUP.md * Update DOCKER_SETUP.md * Update DOCKER_SETUP.md * Update DOCKER_SETUP.md * Update DOCKER_SETUP.md * Update DOCKER_SETUP.md * Update .dockerignore * DB/Redis health check * updated health checks * updated install guide * updated DOCKER_SETUP * Updated DOCKER_SETUP * Updated DOCKER_SETUP * Update and rename DOCKER_SETUP.md to DOCKER_COMPOSE_SETUP.md * RemoveUnreachableStatementRector * Update GroupActivityPubService.php * Larastan: Add @property * Delete rector.php * more properties * 2fa_enabled needs to be refactored * Fix AdminUser.php syntax error - remove invalid property declaration * Update AdminUser.php * update * Upgrade predis from v2.0 to v3.2 - Update predis/predis from ^2.0 to ^3.2 - Predis v3.2.0 includes RESP3 support, improved pipeline abstractions - No code changes required, configuration remains compatible - Tested successfully with tinker * Upgrade predis from v2.0 to v3.2 * Update * Update .env.docker.example * Update DOCKER_COMPOSE_SETUP.md * Create ImageDriverManager.php * Update image.php * Update ImageResizePipeline.php * Update StoryComposeController.php * Update AvatarOptimize.php * Update Image.php * Update composer.json * Update AvatarOptimize.php * update lock * Update composer.lock * update * update * update * Allow to set new image types in admin interface * Update composer, fix deps * Update composer --------- Co-authored-by: Shlee <github@shl.ee> Co-authored-by: Your Name <you@example.com> Co-authored-by: Severin <savewish@icloud.com>
7 months ago
# Switch to root to install packages
USER root
Staging (#6343) * Prepared new docker * Docker setup improvements and fixes * Update DOCKER_SETUP.md * Update DOCKER_SETUP.md * Update DOCKER_SETUP.md * Update DOCKER_SETUP.md * Update DOCKER_SETUP.md * Update DOCKER_SETUP.md * Update .dockerignore * DB/Redis health check * updated health checks * updated install guide * updated DOCKER_SETUP * Updated DOCKER_SETUP * Updated DOCKER_SETUP * Update and rename DOCKER_SETUP.md to DOCKER_COMPOSE_SETUP.md * RemoveUnreachableStatementRector * Update GroupActivityPubService.php * Larastan: Add @property * Delete rector.php * more properties * 2fa_enabled needs to be refactored * Fix AdminUser.php syntax error - remove invalid property declaration * Update AdminUser.php * update * Upgrade predis from v2.0 to v3.2 - Update predis/predis from ^2.0 to ^3.2 - Predis v3.2.0 includes RESP3 support, improved pipeline abstractions - No code changes required, configuration remains compatible - Tested successfully with tinker * Upgrade predis from v2.0 to v3.2 * Update * Update .env.docker.example * Update DOCKER_COMPOSE_SETUP.md * Create ImageDriverManager.php * Update image.php * Update ImageResizePipeline.php * Update StoryComposeController.php * Update AvatarOptimize.php * Update Image.php * Update composer.json * Update AvatarOptimize.php * update lock * Update composer.lock * update * update * update * Allow to set new image types in admin interface * Update composer, fix deps * Update composer --------- Co-authored-by: Shlee <github@shl.ee> Co-authored-by: Your Name <you@example.com> Co-authored-by: Severin <savewish@icloud.com>
7 months ago
# Install system dependencies and PHP extensions
RUN apt-get update && apt-get install -y \
ffmpeg \
unzip \
zip \
jpegoptim \
optipng \
pngquant \
gifsicle \
libvips42 \
git \
curl \
&& rm -rf /var/lib/apt/lists/*
# Install PHP extensions using the built-in helper
RUN install-php-extensions \
bcmath \
curl \
exif \
Staging (#6343) * Prepared new docker * Docker setup improvements and fixes * Update DOCKER_SETUP.md * Update DOCKER_SETUP.md * Update DOCKER_SETUP.md * Update DOCKER_SETUP.md * Update DOCKER_SETUP.md * Update DOCKER_SETUP.md * Update .dockerignore * DB/Redis health check * updated health checks * updated install guide * updated DOCKER_SETUP * Updated DOCKER_SETUP * Updated DOCKER_SETUP * Update and rename DOCKER_SETUP.md to DOCKER_COMPOSE_SETUP.md * RemoveUnreachableStatementRector * Update GroupActivityPubService.php * Larastan: Add @property * Delete rector.php * more properties * 2fa_enabled needs to be refactored * Fix AdminUser.php syntax error - remove invalid property declaration * Update AdminUser.php * update * Upgrade predis from v2.0 to v3.2 - Update predis/predis from ^2.0 to ^3.2 - Predis v3.2.0 includes RESP3 support, improved pipeline abstractions - No code changes required, configuration remains compatible - Tested successfully with tinker * Upgrade predis from v2.0 to v3.2 * Update * Update .env.docker.example * Update DOCKER_COMPOSE_SETUP.md * Create ImageDriverManager.php * Update image.php * Update ImageResizePipeline.php * Update StoryComposeController.php * Update AvatarOptimize.php * Update Image.php * Update composer.json * Update AvatarOptimize.php * update lock * Update composer.lock * update * update * update * Allow to set new image types in admin interface * Update composer, fix deps * Update composer --------- Co-authored-by: Shlee <github@shl.ee> Co-authored-by: Your Name <you@example.com> Co-authored-by: Severin <savewish@icloud.com>
7 months ago
gd \
7 months ago
imagick \
Staging (#6343) * Prepared new docker * Docker setup improvements and fixes * Update DOCKER_SETUP.md * Update DOCKER_SETUP.md * Update DOCKER_SETUP.md * Update DOCKER_SETUP.md * Update DOCKER_SETUP.md * Update DOCKER_SETUP.md * Update .dockerignore * DB/Redis health check * updated health checks * updated install guide * updated DOCKER_SETUP * Updated DOCKER_SETUP * Updated DOCKER_SETUP * Update and rename DOCKER_SETUP.md to DOCKER_COMPOSE_SETUP.md * RemoveUnreachableStatementRector * Update GroupActivityPubService.php * Larastan: Add @property * Delete rector.php * more properties * 2fa_enabled needs to be refactored * Fix AdminUser.php syntax error - remove invalid property declaration * Update AdminUser.php * update * Upgrade predis from v2.0 to v3.2 - Update predis/predis from ^2.0 to ^3.2 - Predis v3.2.0 includes RESP3 support, improved pipeline abstractions - No code changes required, configuration remains compatible - Tested successfully with tinker * Upgrade predis from v2.0 to v3.2 * Update * Update .env.docker.example * Update DOCKER_COMPOSE_SETUP.md * Create ImageDriverManager.php * Update image.php * Update ImageResizePipeline.php * Update StoryComposeController.php * Update AvatarOptimize.php * Update Image.php * Update composer.json * Update AvatarOptimize.php * update lock * Update composer.lock * update * update * update * Allow to set new image types in admin interface * Update composer, fix deps * Update composer --------- Co-authored-by: Shlee <github@shl.ee> Co-authored-by: Your Name <you@example.com> Co-authored-by: Severin <savewish@icloud.com>
7 months ago
intl \
mbstring \
xml \
zip \
pdo_mysql \
redis \
vips \
ffi
# Copy application files
COPY --chown=www-data:www-data . /var/www/html
# Set proper permissions
RUN chown -R www-data:www-data /var/www/html \
&& find /var/www/html -type f -exec chmod 644 {} \; \
&& find /var/www/html -type d -exec chmod 755 {} \; \
&& chmod -R ug+rwx /var/www/html/storage /var/www/html/bootstrap/cache
Staging (#6343) * Prepared new docker * Docker setup improvements and fixes * Update DOCKER_SETUP.md * Update DOCKER_SETUP.md * Update DOCKER_SETUP.md * Update DOCKER_SETUP.md * Update DOCKER_SETUP.md * Update DOCKER_SETUP.md * Update .dockerignore * DB/Redis health check * updated health checks * updated install guide * updated DOCKER_SETUP * Updated DOCKER_SETUP * Updated DOCKER_SETUP * Update and rename DOCKER_SETUP.md to DOCKER_COMPOSE_SETUP.md * RemoveUnreachableStatementRector * Update GroupActivityPubService.php * Larastan: Add @property * Delete rector.php * more properties * 2fa_enabled needs to be refactored * Fix AdminUser.php syntax error - remove invalid property declaration * Update AdminUser.php * update * Upgrade predis from v2.0 to v3.2 - Update predis/predis from ^2.0 to ^3.2 - Predis v3.2.0 includes RESP3 support, improved pipeline abstractions - No code changes required, configuration remains compatible - Tested successfully with tinker * Upgrade predis from v2.0 to v3.2 * Update * Update .env.docker.example * Update DOCKER_COMPOSE_SETUP.md * Create ImageDriverManager.php * Update image.php * Update ImageResizePipeline.php * Update StoryComposeController.php * Update AvatarOptimize.php * Update Image.php * Update composer.json * Update AvatarOptimize.php * update lock * Update composer.lock * update * update * update * Allow to set new image types in admin interface * Update composer, fix deps * Update composer --------- Co-authored-by: Shlee <github@shl.ee> Co-authored-by: Your Name <you@example.com> Co-authored-by: Severin <savewish@icloud.com>
7 months ago
# Install composer dependencies
RUN composer install --no-ansi --no-interaction --optimize-autoloader
Staging (#6343) * Prepared new docker * Docker setup improvements and fixes * Update DOCKER_SETUP.md * Update DOCKER_SETUP.md * Update DOCKER_SETUP.md * Update DOCKER_SETUP.md * Update DOCKER_SETUP.md * Update DOCKER_SETUP.md * Update .dockerignore * DB/Redis health check * updated health checks * updated install guide * updated DOCKER_SETUP * Updated DOCKER_SETUP * Updated DOCKER_SETUP * Update and rename DOCKER_SETUP.md to DOCKER_COMPOSE_SETUP.md * RemoveUnreachableStatementRector * Update GroupActivityPubService.php * Larastan: Add @property * Delete rector.php * more properties * 2fa_enabled needs to be refactored * Fix AdminUser.php syntax error - remove invalid property declaration * Update AdminUser.php * update * Upgrade predis from v2.0 to v3.2 - Update predis/predis from ^2.0 to ^3.2 - Predis v3.2.0 includes RESP3 support, improved pipeline abstractions - No code changes required, configuration remains compatible - Tested successfully with tinker * Upgrade predis from v2.0 to v3.2 * Update * Update .env.docker.example * Update DOCKER_COMPOSE_SETUP.md * Create ImageDriverManager.php * Update image.php * Update ImageResizePipeline.php * Update StoryComposeController.php * Update AvatarOptimize.php * Update Image.php * Update composer.json * Update AvatarOptimize.php * update lock * Update composer.lock * update * update * update * Allow to set new image types in admin interface * Update composer, fix deps * Update composer --------- Co-authored-by: Shlee <github@shl.ee> Co-authored-by: Your Name <you@example.com> Co-authored-by: Severin <savewish@icloud.com>
7 months ago
# Switch back to www-data user
USER www-data
Staging (#6343) * Prepared new docker * Docker setup improvements and fixes * Update DOCKER_SETUP.md * Update DOCKER_SETUP.md * Update DOCKER_SETUP.md * Update DOCKER_SETUP.md * Update DOCKER_SETUP.md * Update DOCKER_SETUP.md * Update .dockerignore * DB/Redis health check * updated health checks * updated install guide * updated DOCKER_SETUP * Updated DOCKER_SETUP * Updated DOCKER_SETUP * Update and rename DOCKER_SETUP.md to DOCKER_COMPOSE_SETUP.md * RemoveUnreachableStatementRector * Update GroupActivityPubService.php * Larastan: Add @property * Delete rector.php * more properties * 2fa_enabled needs to be refactored * Fix AdminUser.php syntax error - remove invalid property declaration * Update AdminUser.php * update * Upgrade predis from v2.0 to v3.2 - Update predis/predis from ^2.0 to ^3.2 - Predis v3.2.0 includes RESP3 support, improved pipeline abstractions - No code changes required, configuration remains compatible - Tested successfully with tinker * Upgrade predis from v2.0 to v3.2 * Update * Update .env.docker.example * Update DOCKER_COMPOSE_SETUP.md * Create ImageDriverManager.php * Update image.php * Update ImageResizePipeline.php * Update StoryComposeController.php * Update AvatarOptimize.php * Update Image.php * Update composer.json * Update AvatarOptimize.php * update lock * Update composer.lock * update * update * update * Allow to set new image types in admin interface * Update composer, fix deps * Update composer --------- Co-authored-by: Shlee <github@shl.ee> Co-authored-by: Your Name <you@example.com> Co-authored-by: Severin <savewish@icloud.com>
7 months ago
# Expose port 8080 (default for serversideup/php)
EXPOSE 8080