-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Does not work properly at the moment, because of: * issues with cypress and bun: cypress-io/cypress#28962 * issues with nx hang: nrwl/nx#27494
- Loading branch information
1 parent
69381dc
commit 04781a8
Showing
4 changed files
with
62 additions
and
11 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,19 @@ | ||
node_modules | ||
Dockerfile* | ||
docker-compose* | ||
.dockerignore | ||
.git | ||
.gitignore | ||
README.md | ||
LICENSE | ||
.vscode | ||
Makefile | ||
helm-charts | ||
.env | ||
.editorconfig | ||
.idea | ||
.angular | ||
.nx | ||
tmp | ||
dist | ||
coverage* |
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 @@ | ||
# use the official Bun image | ||
# see all versions at https://hub.docker.com/r/oven/bun/tags | ||
FROM oven/bun:1 AS base | ||
WORKDIR /usr/src/app | ||
RUN apt-get update && \ | ||
apt-get install -y \ | ||
git \ | ||
unzip | ||
|
||
# install dependencies into temp directory | ||
# this will cache them and speed up future builds | ||
FROM base AS builder | ||
COPY package.json bun.lockb ./ | ||
RUN bun install --frozen-lockfile | ||
COPY . . | ||
# Currently hangs because of https://github.com/nrwl/nx/issues/27494 | ||
RUN export NX_DAEMON=false NX_ISOLATE_PLUGINS=false && \ | ||
bun run build | ||
|
||
# copy compiled code into final image | ||
FROM base AS release | ||
# Don't know yet if having node_modules in the final image is needed. | ||
# If it is, we probably should install a production version | ||
# of our dependencies in the builder stage and copy them here. | ||
# COPY --from=builder /usr/src/app/node_modules ./node_modules | ||
COPY --from=builder /usr/src/app/dist . | ||
COPY --from=builder /usr/src/app/package.json . | ||
|
||
# run the app | ||
USER bun | ||
EXPOSE 4200/tcp | ||
ENTRYPOINT [ "bun", "dist/apps/home/server/server.mjs" ] |
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