-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
56 lines (39 loc) · 938 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
FROM code4romania/php:8.2 AS vendor
WORKDIR /var/www
COPY --chown=www-data:www-data . /var/www
# install extensions
RUN set -ex; \
install-php-extensions \
redis
RUN set -ex; \
composer install \
--optimize-autoloader \
--no-interaction \
--no-plugins \
--no-dev \
--prefer-dist
FROM node:22-alpine AS assets
WORKDIR /build
COPY \
package.json \
package-lock.json \
postcss.config.js \
vite.config.js \
./
RUN set -ex; \
npm ci --no-audit --ignore-scripts
COPY --from=vendor /var/www /build
RUN set -ex; \
npm run build
FROM vendor
ARG VERSION
ARG REVISION
RUN echo "$VERSION (${REVISION:0:7})" > /var/www/.version
# Needed for splitting CSVs
RUN set -ex; \
apk add --no-cache \
gawk;
COPY docker/s6-rc.d /etc/s6-overlay/s6-rc.d
COPY --from=assets --chown=www-data:www-data /build/public/build /var/www/public/build
ENV SENTRY_SAMPLE_RATE=1.0
EXPOSE 80