FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
hackernews-react-graphql/Dockerfile at master · 4dcoder/hackernews-react-graphql · GitHub
4dcoder
/
hackernews-react-graphql
Public
forked from
clintonwoo/hackernews-react-graphql
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
hackernews-react-graphql
/
Dockerfile
Copy path
More file actions
More file actions
Latest commit
History
History
History
34 lines (26 loc) · 874 Bytes
Breadcrumbs
hackernews-react-graphql
/
Dockerfile
Copy path
File metadata and controls
34 lines (26 loc) · 874 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#
DEV BUILD STEP
FROM
node:8.7-alpine as devBuild
WORKDIR
/usr/src/app
RUN
yarn
#
Copy the source and build
#
Build script uses --dev flag to get the right dependencies
COPY
. .
RUN
yarn run build:prod
#
PROD BUILD STEP
#
Using latest LTS release of Node (comes with Yarn package manager by default)
FROM
node:8.7-alpine
#
Create an app directory on the container
WORKDIR
/usr/src/app
ENV
NODE_ENV=production
#
Project copy build, install dependencies
COPY
--from=devBuild /usr/src/app/build/app ./build/app
COPY
package.json yarn.lock README.md ./
RUN
yarn install --prod
#
Install curl to do healthchecks
RUN
apk add curl --no-cache
#
Expose the container port to the OS
#
docker run takes -p argument to forward this port to network
EXPOSE
3000
#
Start the application
CMD
[
"yarn"
,
"start"
]
HEALTHCHECK
CMD curl --silent --fail http://localhost:3000/ || exit 1
Back
|
FazBrowse Home
|
New Git URL