Skip to content

Commit b779f49

Browse files
authored
Merge pull request #306 from GREENRAT-K405/add/frontend-dockerfile
Add frontend dockerfile and .dockerignore
2 parents 4398d89 + 8cb8091 commit b779f49

2 files changed

Lines changed: 43 additions & 0 deletions

File tree

.dockerignore

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
node_modules/
2+
npm-debug.log*
3+
yarn-debug.log*
4+
yarn-error.log*
5+
6+
build/
7+
dist/
8+
.craco/
9+
10+
.env
11+
.env.local
12+
.env.development.local
13+
.env.test.local
14+
.env.production.local
15+
16+
.git/
17+
.gitignore
18+
19+
.vscode/
20+
.idea/
21+
.DS_Store
22+
Thumbs.db
23+
24+
figures/
25+
*.md
26+
coverage/

Dockerfile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM node:17-alpine AS build
2+
3+
WORKDIR /app
4+
COPY package.json package-lock.json ./
5+
RUN npm install
6+
7+
COPY . .
8+
9+
RUN npm run build
10+
11+
FROM nginx:stable-alpine
12+
13+
COPY --from=build /app/build /usr/share/nginx/html
14+
15+
EXPOSE 80
16+
17+
CMD ["nginx", "-g", "daemon off;"]

0 commit comments

Comments
 (0)