Files
stephan.kasdorf 2572c28648 Refactored the application's dockerization and added new services
This commit involves significant changes to the application's infrastructure. It refactors the application into two separate services: 'nibiru-auth-api' and 'nibiru-webhook-receiver'. Each service has its corresponding Dockerfile, Nginx & PHP-FPM configuration. It also provides a separate Nginx configuration for handling requests for each service. New environment files, start and stop scripts are introduced to facilitate local and production deployments.
2024-05-31 15:13:10 +02:00

38 lines
914 B
Docker

# Use the official PHP-FPM image for PHP 8.3
FROM php:8.3-fpm
# Import the timezone and virtual port arguments
ARG TZ
ARG FPM_VIRTUAL_PORT
# Set the working directory
WORKDIR /var/www/html
# Install Composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
# Install system dependencies
RUN apt-get update && apt-get install -y \
zip \
unzip \
git \
gettext-base \
&& apt-get clean
# Set the timezone
ENV TZ=$TZ
RUN echo "date.timezone=${TZ}" > /usr/local/etc/php/conf.d/timezone.ini
# Copy entrypoint script and PHP-FPM configuration template
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
COPY conf/zz-docker.conf.template /usr/local/etc/php-fpm.d/zz-docker.conf.template
# Make entrypoint script executable
RUN chmod +x /usr/local/bin/entrypoint.sh
# Expose port 9000 for PHP-FPM
EXPOSE $FPM_VIRTUAL_PORT
# Set entrypoint
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]