-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #241 from AgileVentures/104-dockerize-for-local-de…
…velopment 104 Dockerize for local Development ( Can also be used for Production )
- Loading branch information
Showing
4 changed files
with
74 additions
and
12 deletions.
There are no files selected for viewing
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.git | ||
*Dockerfile* | ||
*docker-compose* | ||
node_modules | ||
*README.md* | ||
*.eslintrc* | ||
CODE_OF_CONDUCT.md | ||
CONTRIBUTION_GUIDE.md | ||
.env |
This file contains 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 characters
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
server { | ||
listen 80; | ||
root /usr/share/nginx/html; | ||
index index.html; | ||
|
||
location / { | ||
try_files $uri $uri/ /index.html =404; | ||
} | ||
} |
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
FROM node:10.13.0-alpine as production-build | ||
COPY . . | ||
|
||
# Install yarn | ||
RUN npm install -g yarn | ||
|
||
# Install only production dependencies | ||
RUN yarn install | ||
|
||
# create the production build (./build) | ||
RUN yarn build | ||
|
||
# Server the production build created with NginX | ||
FROM nginx:1.13.9-alpine | ||
LABEL app="websiteone-fe" | ||
|
||
COPY --from=production-build ./dist /usr/share/nginx/html | ||
COPY docker-config/vhost.conf /etc/nginx/conf.d/default.conf | ||
EXPOSE 80 | ||
WORKDIR /usr/share/nginx/html | ||
CMD ["nginx", "-g", "daemon off;"] |
6644ce6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully aliased the URL https://websiteone-fe-2f20mludb.now.sh to the following aliases.