forked from ezsystems/ezplatform
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Merge branch '1.7' into 1.11
- Loading branch information
Showing
23 changed files
with
162 additions
and
81 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 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,40 @@ | ||
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/fonts ]; then mkdir /var/www/web/fonts; 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,20 @@ | ||
FROM debian:stretch-slim | ||
|
||
ENV DEBIAN_FRONTEND noninteractive | ||
|
||
# Use packages from Varnish to get Varnsih 5.1, 5.0 packages with debian:stretch gives segmentation faults | ||
RUN apt-get update -q -y && \ | ||
apt-get install -q -y --no-install-recommends ca-certificates curl && \ | ||
curl -s https://packagecloud.io/install/repositories/varnishcache/varnish5/script.deb.sh | bash && \ | ||
apt-get install -q -y --allow-unauthenticated --no-install-recommends varnish && \ | ||
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 | ||
|
||
ENV VARNISH_MALLOC_SIZE="256M" | ||
|
||
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
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.