prod ready ?
This commit is contained in:
46
Dockerfile
Normal file
46
Dockerfile
Normal file
@@ -0,0 +1,46 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
|
||||
# ==========================================================
|
||||
# PHP-FPM
|
||||
# ==========================================================
|
||||
FROM php:8.3-fpm-bookworm AS php
|
||||
|
||||
ENV TZ=Europe/Paris
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
ca-certificates \
|
||||
curl \
|
||||
libcurl4-openssl-dev \
|
||||
libonig-dev \
|
||||
&& docker-php-ext-install -j"$(nproc)" \
|
||||
pdo_mysql \
|
||||
mysqli \
|
||||
mbstring \
|
||||
curl \
|
||||
opcache \
|
||||
&& apt-get purge -y --auto-remove libcurl4-openssl-dev libonig-dev \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /var/www/html
|
||||
|
||||
COPY docker/php/php.ini /usr/local/etc/php/conf.d/99-pta.ini
|
||||
COPY . /var/www/html
|
||||
|
||||
RUN chown -R www-data:www-data /var/www/html
|
||||
|
||||
USER www-data
|
||||
|
||||
EXPOSE 9000
|
||||
|
||||
CMD ["php-fpm"]
|
||||
|
||||
# ==========================================================
|
||||
# NGINX
|
||||
# ==========================================================
|
||||
FROM nginx:1.27-alpine AS nginx
|
||||
|
||||
COPY docker/nginx/default.conf /etc/nginx/conf.d/default.conf
|
||||
COPY --from=php /var/www/html /var/www/html
|
||||
|
||||
EXPOSE 80
|
||||
Reference in New Issue
Block a user