Dockerises the app!

This commit is contained in:
2025-06-03 07:27:19 +01:00
parent 077d33d801
commit d404a0097f
10 changed files with 110 additions and 81 deletions

34
Dockerfile Normal file
View File

@@ -0,0 +1,34 @@
FROM docker.io/bitnami/php-fpm:8.4
WORKDIR /app
RUN set -eux \
&& apt-get update && apt-get install -y --no-install-recommends \
acl \
&& rm -rf /var/lib/apt/lists/*
COPY ./symfony/composer.* ./symfony/symfony.* ./
COPY ./symfony/.env.prod ./.env
RUN composer install \
--no-cache \
--no-dev \
--no-progress \
--no-scripts \
--optimize-autoloader \
--prefer-dist
WORKDIR /
COPY ./scripts ./scripts
WORKDIR /app
COPY ./symfony .
RUN mkdir -p var/log var/cache && \
chown -R www-data:www-data var && \
chmod -R 775 var
RUN composer install \
--no-cache \
--no-dev \
--no-progress \
--optimize-autoloader \
--prefer-dist
RUN php bin/console doctrine:migrations:migrate latest