-
Notifications
You must be signed in to change notification settings - Fork 31
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
Showing
6 changed files
with
109 additions
and
15 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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Include any files or directories that you don't want to be copied to your | ||
# container here (e.g., local build artifacts, temporary files, etc.). | ||
# | ||
# For more help, visit the .dockerignore file reference guide at | ||
# https://docs.docker.com/engine/reference/builder/#dockerignore-file | ||
|
||
**/.DS_Store | ||
**/__pycache__ | ||
**/.venv | ||
**/.classpath | ||
**/.dockerignore | ||
**/.env | ||
**/.git | ||
**/.gitignore | ||
**/.project | ||
**/.settings | ||
**/.toolstarget | ||
**/.vs | ||
**/.vscode | ||
**/*.*proj.user | ||
**/*.dbmdl | ||
**/*.jfm | ||
**/bin | ||
**/charts | ||
**/docker-compose* | ||
**/compose* | ||
**/Dockerfile* | ||
**/node_modules | ||
**/npm-debug.log | ||
**/obj | ||
**/secrets.dev.yaml | ||
**/values.dev.yaml | ||
LICENSE | ||
README.md |
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,32 @@ | ||
# syntax=docker/dockerfile:1 | ||
FROM debian:bullseye AS builder | ||
|
||
RUN apt update \ | ||
&& apt install -y \ | ||
python2 \ | ||
npm | ||
|
||
WORKDIR /dim-web | ||
|
||
COPY package.json . | ||
RUN npm install | ||
|
||
COPY . . | ||
|
||
ARG DIM_LOGIN | ||
ARG DIM_RPC | ||
ARG LOGIN | ||
ARG LOGOUT | ||
ARG BASE_URL | ||
|
||
RUN build/replace-process-env-docker-build.sh && cat config/prod.env.js | ||
|
||
RUN npm run build | ||
|
||
# Run the final image | ||
FROM nginx:1.21 AS final | ||
|
||
# Copy the build files to the nginx server | ||
COPY --from=builder /dim-web /var/www/html | ||
COPY --from=builder /dim-web/dist/index.html /var/www/html/dist/static/ | ||
COPY config/dim-web.nginx.conf /etc/nginx/conf.d/ |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
sed -i "s@DIM_LOGIN_PLACE_HOLDER@$DIM_LOGIN@g" config/prod.env.js | ||
sed -i "s@DIM_RPC_PLACE_HOLDER@$DIM_RPC@g" config/prod.env.js | ||
sed -i "s@LOGIN_PLACE_HOLDER@$LOGIN@g" config/prod.env.js | ||
sed -i "s@LOGOUT_PLACE_HOLDER@$LOGOUT@g" config/prod.env.js | ||
sed -i "s@BASE_URL_PLACE_HOLDER@$BASE_URL@g" config/prod.env.js |
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,14 @@ | ||
server { | ||
listen 8000; | ||
server_name localhost; | ||
|
||
location / { | ||
root /var/www/html/dist/static; | ||
index index.html index.htm; | ||
} | ||
|
||
error_page 500 502 503 504 /50x.html; | ||
location = /50x.html { | ||
root /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