Add docker compose config with Postgres

This commit is contained in:
Lewis Dale committed 2024-11-15 11:24:21 +00:00
1 parent 0372f86cd2
commit dc76405ba9
14 files changed
+135 -239

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
FROM composer:lts AS build
WORKDIR /var/www/html
COPY composer.json .
COPY composer.lock .
RUN --mount=type=bind,source=composer.json,target=composer.json \
--mount=type=bind,source=composer.lock,target=composer.lock \
--mount=type=cache,target=/tmp/cache \
composer install --no-dev --no-interaction
FROM php:8.3-fpm AS run
ARG DB_CONNECTION
WORKDIR /var/www/html
RUN apt-get update && apt-get install -y \
libpq-dev
RUN docker-php-ext-install pdo_pgsql
COPY --from=build /var/www/html/vendor /var/www/html/vendor