Skip to content

Commit ac9105f

Browse files
authored
Merge pull request #18 from stephenjannin/main
Add Dockerfile
2 parents 42dc91b + 9028579 commit ac9105f

File tree

3 files changed

+27
-1
lines changed

3 files changed

+27
-1
lines changed

.github/workflows/azure-static-web-apps-ashy-sky-02a7d0403.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ jobs:
3232
api_location: "" # Api source code path - optional
3333
output_location: "dist" # Built app content directory - optional
3434
###### End of Repository/Build Configurations ######
35-
35+
# allows the workflow to continue without deploying the site's content
36+
env:
37+
SKIP_DEPLOY_ON_MISSING_SECRETS: true
3638
close_pull_request_job:
3739
if: github.event_name == 'pull_request' && github.event.action == 'closed'
3840
runs-on: ubuntu-latest

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)