forked from ezsystems/ezplatform-ee
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch ‘ezplatform/1.11' into ‘ezplatform-ee/1.11’
# Conflicts: # composer.json
- Loading branch information
Showing
26 changed files
with
216 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,6 +42,7 @@ web/bundles/ | |
web/css/ | ||
web/js/ | ||
web/uploads/ | ||
web/fonts/ | ||
|
||
# Assets managed by Bower | ||
web/assets/vendor/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
FROM ezsystems/php:7.1-v1 as web-build | ||
|
||
ENV SYMFONY_ENV=prod | ||
|
||
# Copy in project files into work dir | ||
COPY . /var/www | ||
|
||
# Create asset directories that might not exists | ||
RUN if [ ! -d /var/www/web/bundles ]; then mkdir /var/www/web/bundles; fi | ||
RUN if [ ! -d /var/www/web/css ]; then mkdir /var/www/web/css; fi | ||
RUN if [ ! -d /var/www/web/fonts ]; then mkdir /var/www/web/fonts; fi | ||
RUN if [ ! -d /var/www/web/js ]; then mkdir /var/www/web/js; fi | ||
RUN if [ ! -d /var/www/web/assets ]; then mkdir /var/www/web/assets; fi | ||
|
||
# Generate assets using hard copy as we need to copy them over to resulting image | ||
RUN composer config extra.symfony-assets-install hard | ||
RUN composer run-script post-install-cmd --no-interaction | ||
|
||
|
||
# Copy over just the files we want in second stage, so resulting stage only has assets | ||
# and vhost config in as few layers as possible | ||
FROM nginx:stable as web-multilayers | ||
|
||
COPY bin/vhost.sh /var/www/bin/vhost.sh | ||
COPY doc/nginx/vhost.template /var/www/doc/nginx/vhost.template | ||
|
||
# Auto generated assets | ||
COPY --from=web-build /var/www/web/bundles /var/www/web/bundles | ||
COPY --from=web-build /var/www/web/css /var/www/web/css | ||
COPY --from=web-build /var/www/web/fonts /var/www/web/fonts | ||
COPY --from=web-build /var/www/web/js /var/www/web/js | ||
|
||
# User provided assets | ||
COPY --from=web-build /var/www/web/assets /var/www/web/assets | ||
|
||
|
||
# In third stage build the resulting image | ||
FROM nginx:stable | ||
|
||
COPY --from=web-multilayers /var/www /var/www | ||
COPY doc/nginx/ez_params.d /etc/nginx/ez_params.d | ||
|
||
CMD /bin/bash -c "cd /var/www && bin/vhost.sh --template-file=doc/nginx/vhost.template > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'" |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
FROM debian:stretch-slim | ||
|
||
ENV VARNISH_MALLOC_SIZE="256M" \ | ||
DEBIAN_FRONTEND=noninteractive | ||
|
||
ARG PACKAGECLOUD_URL=https://packagecloud.io/install/repositories/varnishcache/varnish5/script.deb.sh | ||
ARG VARNISH_MODULES_VERSION=0.12.1 | ||
|
||
# Use offical packages from Varnish and build with varnish-modules mainly for xkey | ||
# see: https://github.com/varnish/varnish-modules/tree/master/docs | ||
RUN set -xe \ | ||
&& buildDeps=" \ | ||
make \ | ||
automake \ | ||
autotools-dev \ | ||
libedit-dev \ | ||
libjemalloc-dev \ | ||
libncurses-dev \ | ||
libpcre3-dev \ | ||
libtool \ | ||
pkg-config \ | ||
python-docutils \ | ||
python-sphinx \ | ||
varnish-dev \ | ||
" \ | ||
# Update apt and get dependencies | ||
&& apt-get update -q -y \ | ||
&& apt-get install -q -y --no-install-recommends ca-certificates curl \ | ||
\ | ||
# Get offical Varnish package | ||
&& curl -s ${PACKAGECLOUD_URL} | bash \ | ||
&& apt-get install -q -y --allow-unauthenticated --no-install-recommends varnish $buildDeps \ | ||
\ | ||
# Install varnish modules | ||
&& curl -A "Docker" -o /tmp/varnish-modules.tar.gz -D - -L -s https://download.varnish-software.com/varnish-modules/varnish-modules-${VARNISH_MODULES_VERSION}.tar.gz \ | ||
&& tar zxpf /tmp/varnish-modules.tar.gz -C /tmp/ \ | ||
&& cd /tmp/varnish-modules-${VARNISH_MODULES_VERSION} \ | ||
&& ./configure \ | ||
&& make \ | ||
# && make check \ | ||
&& make install \ | ||
&& rm -f /tmp/varnish-modules.tar.gz && rm -Rf /tmp/varnish-modules \ | ||
\ | ||
# Cleanup apt cache and remove build packages | ||
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $buildDeps \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
COPY doc/varnish/vcl/varnish4.vcl /etc/varnish/default.vcl | ||
COPY doc/docker/entrypoint/varnish/parameters.vcl /etc/varnish/parameters.vcl | ||
|
||
EXPOSE 80 6082 | ||
|
||
# CMD in shell form to be able to use env variables here | ||
CMD varnishd -F -a :80 -T :6082 -f /etc/varnish/default.vcl -s malloc,${VARNISH_MALLOC_SIZE} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.