Skip to content

Commit bf8c190

Browse files
committed
node11 + Dockerfile cleanup
1 parent 20a6ecb commit bf8c190

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

Dockerfile

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1+
##############################################
12
# Stage 1: Install node dependencies and run gulp
2-
FROM node:8 as npm
3+
##############################################
4+
5+
FROM node:11 as npm
36
WORKDIR /app
7+
48
COPY package.json /app
59
COPY package-lock.json /app
610
RUN npm install
@@ -9,10 +13,14 @@ COPY resources /app/resources
913
COPY gulpfile.js /app
1014
RUN npm run gulp
1115

16+
##############################################
1217
# Stage 2: Composer, nginx and fpm
18+
##############################################
19+
1320
FROM bkuhl/fpm-nginx:7.3
1421
WORKDIR /var/www/html
1522

23+
# Contains laravel echo server proxy configuration
1624
COPY /nginx.conf /etc/nginx/conf.d
1725

1826
USER www-data
@@ -32,9 +40,10 @@ ADD --chown=www-data:www-data /database /var/www/html/database
3240
ADD --chown=www-data:www-data /config /var/www/html/config
3341
ADD --chown=www-data:www-data /app /var/www/html/app
3442

35-
RUN composer dump-autoload --optimize --no-dev
36-
RUN touch /var/www/html/database/database.sqlite
37-
RUN php artisan optimize && php artisan migrate
43+
RUN composer dump-autoload --optimize --no-dev \
44+
&& touch /var/www/html/database/database.sqlite \
45+
&& php artisan optimize \
46+
&& php artisan migrate
3847

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

0 commit comments

Comments
 (0)