-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDockerfile
More file actions
34 lines (24 loc) · 1 KB
/
Dockerfile
File metadata and controls
34 lines (24 loc) · 1 KB
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
FROM ghcr.io/myspeedpuzzling/web-base-php85:main
ENV APP_ENV="prod" \
APP_DEBUG=0 \
PHP_OPCACHE_VALIDATE_TIMESTAMPS=0
RUN rm $PHP_INI_DIR/conf.d/docker-php-ext-xdebug.ini
COPY .docker/on-startup.sh /docker-entrypoint.d/
COPY composer.json composer.lock symfony.lock ./
RUN composer install --no-dev --no-interaction --no-scripts
COPY package.json package-lock.json ./
RUN npm install
COPY webpack.config.js ./
COPY ./assets ./assets
ENV NODE_ENV=production
RUN npm run build
COPY . .
# Pre-compress static assets at maximum quality for Caddy's precompressed file_server.
# Brotli q11 is ~10-17% smaller than on-the-fly q5-6, with zero serving CPU overhead.
RUN find public -type f \( -name '*.js' -o -name '*.css' -o -name '*.svg' \) \
-exec brotli -q 11 --keep {} \; \
-exec gzip -9 --keep {} \;
# Need to run again to trigger scripts with application code present
RUN composer install --no-dev --no-interaction --classmap-authoritative
ARG APP_VERSION
ENV SENTRY_RELEASE="${APP_VERSION}"