Skip to content

Commit

Permalink
node11 + Dockerfile cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
fredsted committed Oct 16, 2019
1 parent 20a6ecb commit bf8c190
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions Dockerfile
@@ -1,6 +1,10 @@
##############################################
# Stage 1: Install node dependencies and run gulp
FROM node:8 as npm
##############################################

FROM node:11 as npm
WORKDIR /app

COPY package.json /app
COPY package-lock.json /app
RUN npm install
Expand All @@ -9,10 +13,14 @@ COPY resources /app/resources
COPY gulpfile.js /app
RUN npm run gulp

##############################################
# Stage 2: Composer, nginx and fpm
##############################################

FROM bkuhl/fpm-nginx:7.3
WORKDIR /var/www/html

# Contains laravel echo server proxy configuration
COPY /nginx.conf /etc/nginx/conf.d

USER www-data
Expand All @@ -32,9 +40,10 @@ ADD --chown=www-data:www-data /database /var/www/html/database
ADD --chown=www-data:www-data /config /var/www/html/config
ADD --chown=www-data:www-data /app /var/www/html/app

RUN composer dump-autoload --optimize --no-dev
RUN touch /var/www/html/database/database.sqlite
RUN php artisan optimize && php artisan migrate
RUN composer dump-autoload --optimize --no-dev \
&& touch /var/www/html/database/database.sqlite \
&& php artisan optimize \
&& php artisan migrate

ADD --chown=www-data:www-data /resources /var/www/html/resources
COPY --chown=www-data:www-data --from=npm /app/public/css /var/www/html/public/css
Expand Down

0 comments on commit bf8c190

Please sign in to comment.