forked from teamhanko/hanko
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7000e08
commit 4d97a58
Showing
3 changed files
with
20,503 additions
and
0 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,18 @@ | ||
FROM node:16.1.0-alpine as build | ||
|
||
WORKDIR /app | ||
ENV PATH /app/node_modules/.bin:$PATH | ||
|
||
COPY package.json ./ | ||
COPY package-lock.json ./ | ||
|
||
RUN npm ci --silent | ||
COPY . ./ | ||
RUN npm run build | ||
|
||
FROM nginx:stable-alpine | ||
COPY --from=build /app/dist/hanko.js /usr/share/nginx/html | ||
|
||
COPY nginx/default.conf /etc/nginx/conf.d/default.conf | ||
EXPOSE 80 | ||
CMD ["nginx", "-g", "daemon off;"] |
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,27 @@ | ||
server { | ||
listen 80; | ||
server_name localhost; | ||
|
||
server_tokens off; | ||
|
||
location / { | ||
root /usr/share/nginx/html; | ||
# index index.html; | ||
try_files $uri $uri/ @index; | ||
} | ||
|
||
location @index { | ||
# add_header Cache-Control no-cache; | ||
server_tokens off; | ||
expires -1; | ||
root /usr/share/nginx/html; | ||
try_files /index.html =404; | ||
} | ||
|
||
# redirect server error pages to the static page /50x.html | ||
# | ||
error_page 500 502 503 504 /50x.html; | ||
location = /50x.html { | ||
root /usr/share/nginx/html; | ||
} | ||
} |
Oops, something went wrong.