added db to symfony
This commit is contained in:
+39
@@ -0,0 +1,39 @@
|
||||
FROM dunglas/frankenphp:1-php8.4-bookworm
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Install extensions Symfony commonly needs now,
|
||||
# plus MariaDB support for the next phase.
|
||||
RUN install-php-extensions \
|
||||
intl \
|
||||
opcache \
|
||||
pdo_mysql \
|
||||
zip
|
||||
|
||||
# Copy Composer from its official image.
|
||||
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
|
||||
|
||||
# Copy dependency definitions first.
|
||||
# This allows Docker to cache composer install between builds.
|
||||
COPY composer.json composer.lock symfony.lock ./
|
||||
|
||||
ENV APP_ENV=prod
|
||||
ENV APP_DEBUG=0
|
||||
ENV SERVER_NAME=:8080
|
||||
|
||||
RUN composer install \
|
||||
--no-dev \
|
||||
--prefer-dist \
|
||||
--no-interaction \
|
||||
--no-progress \
|
||||
--no-scripts
|
||||
|
||||
# Copy the rest of the Symfony project.
|
||||
COPY . .
|
||||
|
||||
# Run Symfony/Flex scripts now that the complete project exists.
|
||||
RUN composer run-script post-install-cmd \
|
||||
&& mkdir -p var/cache var/log \
|
||||
&& chown -R www-data:www-data var
|
||||
|
||||
EXPOSE 8080
|
||||
Reference in New Issue
Block a user