Skip to content

Commit e773f4a

Browse files
committed
add Dockerfile
1 parent 31bc2a2 commit e773f4a

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Stage 1: Build the Vue.js application
2+
FROM node:14 as build-stage
3+
WORKDIR /app
4+
COPY package*.json ./
5+
RUN npm install
6+
COPY . .
7+
RUN npm run build
8+
9+
# Stage 2: Serve the application with Nginx
10+
FROM nginx:1.19 as production-stage
11+
COPY --from=build-stage /app/dist /usr/share/nginx/html
12+
EXPOSE 80
13+
CMD ["nginx", "-g", "daemon off;"]

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,17 @@ npm install
9696
npm run serve
9797
```
9898

99+
### Docker build
100+
```
101+
docker build -t copilot-metrics-viewer .
102+
```
103+
104+
### Docker run
105+
```
106+
docker run -p 8080:80 copilot-metrics-viewer
107+
```
108+
The application is accessible at http://localhost:8080
109+
99110
## License
100111

101112
This project is licensed under the terms of the MIT open source license. Please refer to [MIT](./LICENSE.txt) for the full terms.

0 commit comments

Comments
 (0)