Forked from praveenweb/5.single-stage-production-node.Dockerfile
Last active
March 2, 2018 11:57
-
-
Save lex111/e66a33435c0576d1feab13f3a7c99e61 to your computer and use it in GitHub Desktop.
Revisions
-
lex111 revised this gist
Mar 2, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -3,7 +3,7 @@ FROM node:carbon # Создать директорию app WORKDIR /app # Установить зависимости приложения # RUN npm -g install serve # Используется символ подстановки для копирования как package.json, так и package-lock.json -
lex111 revised this gist
Mar 2, 2018 . 1 changed file with 7 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,23 +1,23 @@ FROM node:carbon # Создать директорию app WORKDIR /app # Установить все зависимости приложения # RUN npm -g install serve # Используется символ подстановки для копирования как package.json, так и package-lock.json COPY package*.json ./ RUN npm install # Скопировать исходники приложения COPY src /app # Собрать статические файлы react/vue/angular # RUN npm run build EXPOSE 8080 # Используется при обслуживании статических файлов # CMD ["serve", "-s", "dist", "-p", "8080"] CMD [ "node", "server.js" ] -
praveenweb created this gist
Feb 7, 2018 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,23 @@ FROM node:carbon # Create app directory WORKDIR /app # Install app dependencies # RUN npm -g install serve # A wildcard is used to ensure both package.json AND package-lock.json are copied COPY package*.json ./ RUN npm install # Bundle app source COPY src /app # Build react/vue/angular bundle static files # RUN npm run build EXPOSE 8080 # If serving static files #CMD ["serve", "-s", "dist", "-p", "8080"] CMD [ "node", "server.js" ]