Build custom docker image with forked Freescout enabling s3
ci/woodpecker/push/woodpecker Pipeline was successful Details
ci/woodpecker/manual/woodpecker Pipeline was successful Details

This commit is contained in:
Erki Aas 2023-08-01 14:46:12 +03:00
parent 4a8d301f7b
commit 9def853d95
4 changed files with 67 additions and 2 deletions

View File

@ -1,2 +1,61 @@
FROM docker.io/tiredofit/freescout
RUN git clone https://github.com/bolsunovskyi/freescout-oauth.git /assets/modules/OAuth
FROM php:7.4-apache AS php-base
# Set Apache document root
ENV APACHE_DOCUMENT_ROOT /app/public
RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf
RUN sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf
# Use the default production configuration
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
# Dependencies
RUN apt-get update -y && apt-get install -y ssh libpng-dev libkrb5-dev libmagickwand-dev libjpeg-dev libmemcached-dev zlib1g-dev libzip-dev git unzip subversion ca-certificates libicu-dev libxml2-dev libmcrypt-dev libc-client-dev && apt-get autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/
# PHP Extensions - PECL
RUN pecl install imagick-3.4.4 memcached mcrypt-1.0.4 && docker-php-ext-enable imagick memcached mcrypt
# PHP Extensions - configure imap
RUN docker-php-ext-configure imap --with-kerberos --with-imap-ssl
# PHP Extensions - docker-php-ext-install
RUN docker-php-ext-install zip gd mysqli exif pdo pdo_mysql opcache intl imap
# PHP Extensions - docker-php-ext-configure
RUN docker-php-ext-configure intl
# PHP Tools
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && php composer-setup.php --install-dir=/usr/local/bin --filename=composer
# Config
RUN a2enmod rewrite
# Override default config with custom PHP settings
COPY config/* $PHP_INI_DIR/conf.d/
# Rewrite port
RUN sed -ri -e 's/80/8080/g' /etc/apache2/ports.conf
RUN sed -ri -e 's/80/8080/g' /etc/apache2/sites-available/*.conf
RUN sed -ri -e 's/80/8080/g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf
# Use www-data
RUN mkdir /app
RUN chown www-data:www-data /app
FROM php-base AS php
USER www-data
WORKDIR /app
# Install freescout
RUN git clone -b add-s3-support https://github.com/veebkolm/freescout.git /app
# Install oauth plugin
RUN git clone https://github.com/bolsunovskyi/freescout-oauth.git /app/Modules/OAuth
# Install Composer dependencies
RUN cd /app && composer install --no-dev && composer clear-cache
# Create necessary symlink
RUN php artisan storage:link
EXPOSE 8080

4
config/opcache.ini Normal file
View File

@ -0,0 +1,4 @@
opcache.enable=1
opcache.memory_consumption=64
opcache.max_accelerated_files=10000
opcache.revalidate_freq=0

1
config/overrides.ini Normal file
View File

@ -0,0 +1 @@
max_execution_time=90

1
config/uploads.ini Normal file
View File

@ -0,0 +1 @@
max_execution_time=90