feat: add PostgreSQL support with Compose profiles
- Add db-postgres service behind 'postgres' profile (MariaDB moved to 'mariadb' profile) - Both databases aliased as 'db'; PHP waits for healthy DB (Compose >= 2.20) - Pass DB_TYPE to the PHP container - New PHP extensions: pdo_pgsql, gd, bcmath - Upgrade Node.js to v26.x - Update README with database selection docs and v1.2.0 changelog
This commit is contained in:
1 parent
d6493fb02d
commit
89fd137aca
5 files changed
+199
-55
No files matched your search
+12
-9
@@ -4,6 +4,9 @@ FROM dunglas/frankenphp:php${PHP_VERSION}-trixie AS base
|
||||
# add additional extensions here:
|
||||
RUN install-php-extensions \
|
||||
pdo_mysql \
|
||||
pdo_pgsql \
|
||||
gd \
|
||||
bcmath \
|
||||
mbstring \
|
||||
curl \
|
||||
xml \
|
||||
@@ -28,12 +31,12 @@ RUN chmod +x /usr/bin/composer
|
||||
# -------------------------
|
||||
FROM base AS node
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y curl gnupg \
|
||||
&& curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
|
||||
&& apt-get install -y nodejs \
|
||||
&& node -v \
|
||||
&& npm -v \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
&& apt-get install -y curl gnupg \
|
||||
&& curl -fsSL https://deb.nodesource.com/setup_26.x | bash - \
|
||||
&& apt-get install -y nodejs \
|
||||
&& node -v \
|
||||
&& npm -v \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# -------------------------
|
||||
# Symfony profile
|
||||
@@ -89,6 +92,6 @@ RUN if [ -d /app/storage ]; then chown -R 65534:65534 /app/storage /app/bootstra
|
||||
ARG MODE
|
||||
# production mode: direct run container on server
|
||||
RUN if [ "$MODE" = "prod" ]; then \
|
||||
# Enable PHP production settings
|
||||
mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"; \
|
||||
fi
|
||||
# Enable PHP production settings
|
||||
mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"; \
|
||||
fi
|
||||
Reference in new issue
Block a user