-
Notifications
You must be signed in to change notification settings - Fork 11
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
810fe8e
commit 6b1baa9
Showing
5 changed files
with
36 additions
and
23 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 |
---|---|---|
@@ -1,4 +1,30 @@ | ||
# Usage: | ||
# | ||
# Build image: | ||
# docker build -t jojozhuang/online-judge-web . | ||
# | ||
# Run image (on localhost:9020): | ||
# docker run -d --name online-judge-web -p 9020:80 jojozhuang/online-judge-web | ||
# | ||
# Run image as virtual host (read more: https://github.com/nginx-proxy/nginx-proxy): | ||
# docker run -e VIRTUAL_HOST=online-judge-web --name online-judge-web jojozhuang/online-judge-web | ||
|
||
# Stage 1, based on Node.js, to build and compile Angular | ||
|
||
FROM node:15.12.0-alpine as builder | ||
|
||
WORKDIR /ng-app | ||
|
||
COPY package*.json tsconfig*.json angular.json ./ | ||
COPY ./src ./src | ||
|
||
RUN npm ci --quiet && npm run build-nas | ||
|
||
# Stage 2, based on Nginx, to have only the compiled app, ready for production with Nginx | ||
|
||
FROM nginx:1.19.8-alpine | ||
|
||
COPY ./nginx.conf /etc/nginx/conf.d/default.conf | ||
COPY ./dist/ /usr/share/nginx/html/ | ||
|
||
## From ‘builder’ stage copy over the artifacts in dist folder to default nginx public folder | ||
COPY --from=builder /ng-app/dist /usr/share/nginx/html |
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
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,4 +1,7 @@ | ||
.env-name { | ||
color: whitesmoke; | ||
background-color: olivedrab; | ||
margin-left: 20px; | ||
padding: 0px 8px; | ||
font-weight: bold; | ||
color: greenyellow; | ||
} |