Skip to content

Commit

Permalink
Fix bug where production image would fail to fetch ace-editor script.
Browse files Browse the repository at this point in the history
This script file is now embedded in the nginx image. Additionally, bokeh
scripts are now also stored in the nginx image, so we don't need to
fetch them from the CDN at runtime.
  • Loading branch information
GJFR committed Dec 2, 2024
1 parent ee381f0 commit ce967dd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,16 @@ RUN npm run build


FROM openresty/openresty:1.27.1.1-bullseye AS nginx
RUN apt update -y && \
apt install -y curl && \
rm -rf /var/lib/apt/lists/*
RUN mkdir -p /www/data/js && \
curl https://cdn.bokeh.org/bokeh/release/bokeh-3.6.1.min.js -o /www/data/js/bokeh.min.js && \
curl https://cdn.bokeh.org/bokeh/release/bokeh-api-3.6.1.min.js -o /www/data/js/bokeh-api.min.js
COPY ./nginx/start.sh /usr/local/bin/
COPY ./nginx/config /etc/nginx/config
COPY --from=ui-build-stage /app/dist /www/data
COPY --from=ui-build-stage /app/node_modules/ace-builds/src-min-noconflict /www/data/node_modules/ace-builds/src-min-noconflict
CMD ["start.sh"]


Expand Down
4 changes: 2 additions & 2 deletions bci/web/vue/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<script src="https://cdn.bokeh.org/bokeh/release/bokeh-3.6.1.min.js"></script>
<script src="https://cdn.bokeh.org/bokeh/release/bokeh-api-3.6.1.min.js"></script>
<script src="/js/bokeh.min.js"></script>
<script src="/js/bokeh-api.min.js"></script>
<title>BugHog</title>
</head>
<body class="bg-white text-[#213547] dark:bg-dark-1 dark:text-white">
Expand Down

0 comments on commit ce967dd

Please sign in to comment.