This repository has been archived by the owner on Dec 4, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Rolling Update and Liveness Probe
- Loading branch information
Christopher Miller
committed
Nov 15, 2019
1 parent
33fd627
commit 43e756e
Showing
5 changed files
with
1,469 additions
and
771 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 |
---|---|---|
@@ -1,2 +1,4 @@ | ||
.next/ | ||
node_modules/ | ||
out/ | ||
nginx.conf |
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 |
---|---|---|
@@ -1,18 +1,27 @@ | ||
FROM node:carbon as builder | ||
FROM node:erbium as builder | ||
|
||
WORKDIR /app | ||
|
||
ADD . . | ||
|
||
ENV NODE_ENV production | ||
|
||
RUN npm install | ||
RUN npm install -g yarn | ||
|
||
ADD package.json . | ||
|
||
RUN npm run build | ||
ADD yarn.lock . | ||
|
||
RUN npm run export | ||
RUN yarn install | ||
|
||
ADD . . | ||
|
||
RUN yarn build | ||
|
||
RUN yarn export | ||
|
||
FROM nginx:1.17.5-alpine | ||
|
||
ADD nginx.conf /etc/nginx/nginx.conf | ||
|
||
COPY --from=builder /app/out/ /usr/share/nginx/html/ | ||
|
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,34 @@ | ||
user nginx; | ||
worker_processes auto; | ||
|
||
pid /var/run/nginx.pid; | ||
|
||
|
||
events { | ||
worker_connections 1024; | ||
} | ||
|
||
|
||
http { | ||
include /etc/nginx/mime.types; | ||
default_type application/octet-stream; | ||
|
||
sendfile on; | ||
|
||
keepalive_timeout 65; | ||
|
||
server { | ||
listen 80; | ||
server_name localhost; | ||
|
||
location / { | ||
root /usr/share/nginx/html; | ||
index index.html index.htm; | ||
} | ||
|
||
location /health { | ||
return 200 'alive'; | ||
add_header Content-Type text/plain; | ||
} | ||
} | ||
} |
Oops, something went wrong.