Docker: Added storage path to container

Closes #505
This commit is contained in:
Igor Scheller 2018-11-28 12:30:40 +01:00 committed by msquare
parent e0de2c2c65
commit 8a9031fa01
1 changed files with 5 additions and 1 deletions

View File

@ -15,19 +15,22 @@ FROM alpine as data
COPY bin/ /app/bin COPY bin/ /app/bin
COPY config/ /app/config COPY config/ /app/config
COPY db/ /app/db COPY db/ /app/db
COPY import/ /app/import
COPY includes/ /app/includes COPY includes/ /app/includes
COPY public/ /app/public COPY public/ /app/public
COPY --from=frontend /var/www/public/assets/ /app/public/assets COPY --from=frontend /var/www/public/assets/ /app/public/assets
COPY resources/lang /app/resources/lang COPY resources/lang /app/resources/lang
COPY resources/views /app/resources/views COPY resources/views /app/resources/views
COPY src/ /app/src COPY src/ /app/src
COPY storage/ /app/storage
COPY composer.json LICENSE package.json README.md /app/ COPY composer.json LICENSE package.json README.md /app/
COPY --from=composer /app/vendor/ /app/vendor COPY --from=composer /app/vendor/ /app/vendor
COPY --from=composer /app/composer.lock /app/ COPY --from=composer /app/composer.lock /app/
RUN rm -f /app/config/config.php RUN find /app/storage/ -type f -not -name .gitignore -exec rm {} \;
RUN rm -f /app/import/* /app/config/config.php
# Build the PHP container # Build the PHP container
FROM php:7-fpm-alpine FROM php:7-fpm-alpine
@ -35,6 +38,7 @@ WORKDIR /var/www
COPY --from=data /app/ /var/www COPY --from=data /app/ /var/www
RUN apk add --no-cache icu-dev gettext-dev && \ RUN apk add --no-cache icu-dev gettext-dev && \
docker-php-ext-install intl gettext pdo_mysql && \ docker-php-ext-install intl gettext pdo_mysql && \
chown -R www-data:www-data /var/www/import/ /var/www/storage/ && \
rm -r /var/www/html rm -r /var/www/html
ENV TRUSTED_PROXIES 10.0.0.0/8,::ffff:10.0.0.0/8,\ ENV TRUSTED_PROXIES 10.0.0.0/8,::ffff:10.0.0.0/8,\