Skip to content

Commit bb8f93e

Browse files
committed
wip
1 parent fba0cac commit bb8f93e

1 file changed

Lines changed: 15 additions & 6 deletions

File tree

Dockerfile

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,19 @@ FROM code4romania/php:8.2 AS vendor
22

33
WORKDIR /var/www
44

5+
COPY --chown=www-data:www-data . /var/www
6+
57
RUN set -ex; \
68
install-php-extensions \
79
sockets
810

9-
COPY --chown=www-data:www-data . /var/www
10-
1111
RUN set -ex; \
1212
composer install \
13+
--optimize-autoloader \
14+
--no-interaction \
1315
--no-plugins \
14-
--no-dev
16+
--no-dev \
17+
--prefer-dist
1518

1619
FROM node:20-alpine AS assets
1720

@@ -25,18 +28,24 @@ COPY \
2528
vite.config.js \
2629
./
2730

28-
RUN npm ci --no-audit --ignore-scripts
31+
RUN set -ex; \
32+
npm ci --no-audit --ignore-scripts
2933

3034
COPY --from=vendor /var/www /build
3135

32-
RUN npm run build
36+
RUN set -ex; \
37+
npm run build
3338

3439
FROM vendor
3540

41+
ARG VERSION
42+
ARG REVISION
43+
44+
RUN echo "$VERSION (${REVISION:0:7})" > /var/www/.version
45+
3646
COPY docker/s6-rc.d /etc/s6-overlay/s6-rc.d
3747
COPY --from=assets --chown=www-data:www-data /build/public/build /var/www/public/build
3848

39-
4049
ENV WORKER_ENABLED=true
4150

4251
ENV PHP_PM_MAX_CHILDREN=64

0 commit comments

Comments
 (0)