Files
api/services/php/Dockerfile
T
Jeppe Bundgaard 4248de1d7d Add password reset link generation and welcome email functionality
- Introduce `generatePasswordResetLink` method in `users_o` for creating secure password reset links.
- Add `sendWelcomeEmailToCustomer` method to `email` class with support for attachments.
- Update `authRoute.php` to send welcome emails when creating new customers.
- Extend `sendEmail` to handle optional attachments and references.
- Disable PHP entrypoint in Dockerfile for improved flexibility.
2026-02-16 14:55:01 +01:00

73 lines
2.1 KiB
Docker

# Use the official PHP 8.2 image with Apache disabled
FROM php:8.2.15-fpm
# Set the working directory inside the container
WORKDIR /var/www/html
# Install Composer globally
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
# Install required extensions and dependencies
# Install required extensions and dependencies
# Install required extensions and dependencies
RUN set -eux; \
apt-get update; \
apt-get install -y --no-install-recommends \
$PHPIZE_DEPS \
libpng-dev \
libjpeg62-turbo-dev \
libfreetype6-dev \
libxml2-dev \
libonig-dev \
libmagickwand-dev \
libmagickcore-dev \
imagemagick \
pkg-config \
zip \
unzip \
git \
curl \
redis-tools \
libzip-dev \
libssl-dev \
ca-certificates \
mariadb-client; \
update-ca-certificates; \
docker-php-ext-configure gd --with-freetype --with-jpeg; \
docker-php-ext-install -j"$(nproc)" \
mbstring \
exif \
pcntl \
bcmath \
gd \
pdo_mysql \
mysqli \
zip; \
pecl install imagick-3.7.0; \
docker-php-ext-enable imagick; \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $PHPIZE_DEPS; \
rm -rf /var/lib/apt/lists/*
## Do not copy application code at build time; it will be bind-mounted by docker-compose
## If you wish to build a self-contained image, uncomment the next line and adjust the path:
## COPY services/nginx/app /var/www/html
# Set the appropriate permissions for the working directory
RUN chown -R www-data:www-data /var/www/html \
&& chmod -R 755 /var/www/html
## Composer installs are performed at container start by docker-entrypoint.sh
ENV COMPOSER_ALLOW_SUPERUSER=1
## Ensure workdir is correct
WORKDIR /var/www/html
# Copy and enable entrypoint that installs Composer deps on first run
#COPY services/php/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
#RUN chmod +x /usr/local/bin/docker-entrypoint.sh
# Expose port 9000
EXPOSE 9000
#ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
CMD ["php-fpm"]