40 lines
1.0 KiB
Docker
40 lines
1.0 KiB
Docker
FROM php:8.3-cli
|
|
|
|
RUN apt-get update
|
|
RUN apt-get install -y git zip unzip curl netcat-openbsd supervisor\
|
|
libicu-dev libzip-dev libcurl4-openssl-dev libxml2-dev libpq-dev libonig-dev
|
|
|
|
RUN docker-php-ext-install intl zip bcmath xml pdo pdo_pgsql dom mbstring curl
|
|
|
|
# Install xdebug and redis extensions if needed
|
|
#
|
|
#RUN pecl install xdebug redis-6.2.0
|
|
#RUN docker-php-ext-enable redis
|
|
|
|
COPY --from=composer /usr/bin/composer /usr/bin/composer
|
|
|
|
# xDebug configuration
|
|
#
|
|
# COPY ./usr/local/etc/php/conf.d/* /usr/local/etc/php/conf.d/
|
|
|
|
COPY deploy/main/usr/local/bin/supervisor.entrypoint.sh /usr/local/bin/supervisor.entrypoint.sh
|
|
|
|
# Set permissions to match host user (optional)
|
|
#
|
|
# RUN usermod -u 1000 www-data
|
|
# RUN groupmod -g 1000 www-data
|
|
|
|
RUN chmod +x /usr/local/bin/supervisor.entrypoint.sh
|
|
RUN chown -R www-data:www-data /var/www/html
|
|
|
|
WORKDIR /var/www/html
|
|
|
|
COPY composer.* .
|
|
RUN composer install --no-dev
|
|
|
|
COPY . .
|
|
|
|
ENTRYPOINT ["/usr/local/bin/supervisor.entrypoint.sh"]
|
|
CMD ["-c", "/etc/supervisor/supervisord.conf", "-n"]
|
|
|