-
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.
Merge pull request #3 from datascience/feature/UI-conflicts
Prepare the prod build
- Loading branch information
Showing
4 changed files
with
45 additions
and
5 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
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,13 +1,23 @@ | ||
FROM node:14.5.0-stretch-slim | ||
FROM node:14.5.0-stretch-slim as build | ||
|
||
|
||
|
||
WORKDIR /app | ||
COPY ./web/frontend ./ | ||
|
||
RUN npm install | ||
ENV PATH /app/node_modules/.bin:$PATH | ||
COPY ./web/frontend/package.json ./ | ||
COPY ./web/frontend/package-lock.json ./ | ||
|
||
RUN npm ci | ||
RUN npm install [email protected] -g | ||
|
||
COPY ./web/frontend ./ | ||
RUN npm run build | ||
|
||
|
||
FROM nginx:stable-alpine-slim | ||
COPY --from=build /app/build /usr/share/nginx/html | ||
COPY ./web/nginx/nginx.conf /etc/nginx/conf.d/default.conf | ||
EXPOSE 3000 | ||
CMD ["npm", "start"] | ||
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,13 @@ | ||
FROM node:14.5.0-stretch-slim | ||
|
||
|
||
|
||
WORKDIR /app | ||
COPY ./web/frontend ./ | ||
|
||
RUN npm install | ||
RUN npm run build | ||
|
||
EXPOSE 3000 | ||
CMD ["npm", "start"] | ||
|
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,17 @@ | ||
server { | ||
|
||
listen 3000; | ||
|
||
location / { | ||
root /usr/share/nginx/html; | ||
index index.html index.htm; | ||
try_files $uri $uri/ /index.html; | ||
} | ||
|
||
error_page 500 502 503 504 /50x.html; | ||
|
||
location = /50x.html { | ||
root /usr/share/nginx/html; | ||
} | ||
|
||
} |