Skip to content

Commit f2ecb99

Browse files
committed
feat: #30 try frankenphp to serve the php app and static files
1 parent 78b7784 commit f2ecb99

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

Diff for: Dockerfile

+10-11
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1-
FROM bitnami/php-fpm:latest
1+
FROM dunglas/frankenphp:latest
22

3-
RUN echo "extension=pdo_pgsql.so" >> /opt/bitnami/php/etc/php.ini
4-
5-
RUN install_packages nodejs npm \
6-
&& apt-get clean && rm -rf /var/lib/apt/lists /var/cache/apt/archives
3+
RUN apt-get update \
4+
&& apt-get install -y nodejs npm \
5+
&& apt-get clean && rm -rf /var/lib/apt/lists /var/cache/apt/archives \
6+
&& mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini" \
7+
&& curl https://raw.githubusercontent.com/composer/getcomposer.org/76a7060ccb93902cd7576b67264ad91c8a2700e2/web/installer | php -- --quiet
78

89
WORKDIR /app
910

1011
ENV COMPOSER_ALLOW_SUPERUSER=1
12+
ENV SERVER_NAME="0.0.0.0:8080"
1113

1214
COPY package.json .
1315
COPY package-lock.json .
@@ -17,16 +19,13 @@ RUN npm i --frozen-lockfile
1719
COPY composer.json .
1820
COPY composer.lock .
1921

20-
RUN composer install --no-scripts
22+
RUN php composer.phar install --no-scripts
2123

2224
COPY . .
2325

24-
RUN composer install
26+
RUN php composer.phar install
2527

2628
RUN npm run build \
2729
&& apt-get -y remove npm \
2830
&& apt-get -y clean \
29-
&& apt-get -y autoremove \
30-
&& rm -rf /var/lib/apt/lists /var/cache/apt/archives \
31-
&& rm -rf node_modules/ \
32-
&& chown -R daemon:daemon .
31+
&& apt-get -y autoremove

0 commit comments

Comments
 (0)