summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorIgor Scheller <igor.scheller@igorshp.de>2018-09-23 14:18:24 +0200
committerIgor Scheller <igor.scheller@igorshp.de>2018-09-23 14:19:28 +0200
commit590adffa9316b98544cb8d67b03b80e44ba9c8b7 (patch)
treef5a325f7f08e2b534b5e976a7820e5b699925510 /contrib
parentbdb653090c91dc6297a5597fdafcb20be76359d6 (diff)
Fixed release file build (did not include frontend files), formatting
Diffstat (limited to 'contrib')
-rw-r--r--contrib/Dockerfile8
1 files changed, 8 insertions, 0 deletions
diff --git a/contrib/Dockerfile b/contrib/Dockerfile
index 5d40bafb..665fb426 100644
--- a/contrib/Dockerfile
+++ b/contrib/Dockerfile
@@ -1,8 +1,14 @@
+# Setup
+ARG NGINX_IMAGE=engelsystem-nginx:latest
+
+# composer install
FROM composer AS composer
COPY composer.json /app/
RUN composer --no-ansi install --no-dev --ignore-platform-reqs
RUN composer --no-ansi dump-autoload --optimize
+# Use frontend container for assets
+FROM ${NGINX_IMAGE} AS frontend
# Intermediate container for less layers
FROM alpine as data
@@ -11,6 +17,7 @@ COPY config/ /app/config
COPY db/ /app/db
COPY includes/ /app/includes
COPY public/ /app/public
+COPY --from=frontend /var/www/public/assets/ /app/public/assets
COPY resources/lang /app/resources/lang
COPY resources/views /app/resources/views
COPY src/ /app/src
@@ -22,6 +29,7 @@ COPY --from=composer /app/composer.lock /app/
RUN rm -f /app/config/config.php
+# Build the PHP container
FROM php:7-fpm-alpine
WORKDIR /var/www
COPY --from=data /app/ /var/www