-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
36 lines (24 loc) · 947 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
FROM ghcr.io/eventpoints/php:main AS php
ENV APP_ENV="prod" \
APP_DEBUG=0 \
PHP_OPCACHE_PRELOAD="/app/config/preload.php" \
PHP_EXPOSE_PHP="off" \
PHP_OPCACHE_VALIDATE_TIMESTAMPS=0
RUN rm -f /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
RUN mkdir -p var/cache var/log
# Intentionally split into multiple steps to leverage docker layer caching
COPY composer.json composer.lock symfony.lock ./
RUN composer install --no-dev --prefer-dist --no-interaction --no-scripts
# Install npm packages
COPY package.json package-lock.json webpack.config.js ./
RUN npm install
# Production yarn build
COPY ./assets ./assets
RUN npm run build
COPY . .
# Need to run again to trigger scripts with application code present
RUN composer install --no-dev --no-interaction --classmap-authoritative
RUN composer symfony:dump-env prod
RUN chmod -R 777 var
FROM ghcr.io/eventpoints/caddy:main AS caddy
COPY --from=php /app/public public/