-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #178 from bento-platform/update-webpack
Refactor: use more null coalescing, update terminology, add Dockerfiles, update dependencies
- Loading branch information
Showing
25 changed files
with
7,149 additions
and
9,722 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,3 @@ | ||
.github | ||
dist | ||
node_modules |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,21 @@ | ||
FROM node:18-bullseye-slim AS build | ||
# Build bento_web with NodeJS + Webpack | ||
|
||
WORKDIR /web | ||
|
||
COPY package.json package.json | ||
COPY package-lock.json package-lock.json | ||
|
||
RUN npm ci | ||
|
||
COPY . . | ||
|
||
RUN npm run build | ||
|
||
FROM nginx:1.23 | ||
# Serve bento_web with NGINX | ||
|
||
COPY nginx.conf /etc/nginx/nginx.conf | ||
|
||
WORKDIR /web | ||
COPY --from=build /web/dist ./dist |
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,10 @@ | ||
FROM node:18-bullseye-slim | ||
|
||
WORKDIR /web | ||
|
||
COPY package.json package.json | ||
COPY package-lock.json package-lock.json | ||
|
||
RUN npm ci | ||
|
||
ENTRYPOINT [ "sh", "./entrypoint.dev.sh" ] |
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,9 @@ | ||
#!/bin/sh | ||
|
||
if [ -z "${BENTO_WEB_PORT}" ]; then | ||
# Set default internal port to 80 | ||
export BENTO_WEB_PORT=80 | ||
fi | ||
|
||
npm install | ||
npm run start |
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,21 @@ | ||
events { | ||
worker_connections 1024; | ||
} | ||
|
||
http { | ||
# Includes mapping of file name extensions to MIME types of responses | ||
# and defines the default type. | ||
include /etc/nginx/mime.types; | ||
default_type application/octet-stream; | ||
|
||
server { | ||
listen 80; | ||
|
||
server_name _; | ||
|
||
location / { | ||
root /web/dist; | ||
try_files $uri $uri/ /index.html; | ||
} | ||
} | ||
} |
Oops, something went wrong.