-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathDockerfile
32 lines (27 loc) · 1.1 KB
/
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
ARG image_tag=latest
ARG php_version
FROM elifesciences/journal_assets_builder:${image_tag} AS assets
FROM elifesciences/journal_composer:${image_tag} AS composer
FROM elifesciences/php_7.1_fpm:${php_version}
ENV PROJECT_FOLDER=/srv/journal
ENV PHP_ENTRYPOINT=web/app.php
WORKDIR ${PROJECT_FOLDER}
USER root
# lsh@2023-09-18: redis pinned to 5.x line as 6.0 requires php>=7.2
RUN pecl install redis-5.3.7 && \
docker-php-ext-enable redis && \
rm -rf /tmp/pear/
RUN mkdir -p build var && \
chown --recursive elife:elife . && \
chown --recursive www-data:www-data var
COPY --chown=elife:elife .docker/smoke_tests.sh ./
COPY --chown=elife:elife bin/ bin/
COPY --chown=elife:elife web/ web/
COPY --chown=elife:elife app/ app/
COPY --chown=elife:elife build/critical-css/ build/critical-css/
COPY --from=assets --chown=elife:elife /build/rev-manifest.json build/
COPY --from=assets --chown=elife:elife /web/ /srv/journal/web/
COPY --from=composer --chown=elife:elife /app/vendor/ vendor/
COPY --chown=elife:elife src/ src/
USER www-data
HEALTHCHECK --interval=5s CMD HTTP_HOST=localhost assert_fpm /ping 'pong'