Skip to content

Commit

Permalink
Merge pull request #662 from walt-id/openid-refactoring
Browse files Browse the repository at this point in the history
Distributed & persisted issuer/verifier sessions
  • Loading branch information
waltkb authored Aug 1, 2024
2 parents 702e29a + f160fce commit 8734205
Show file tree
Hide file tree
Showing 84 changed files with 16,066 additions and 659 deletions.
24 changes: 13 additions & 11 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
*/build
*/.nuxt
*/node_modules
*/Dockerfile
*/docker-compose*
*/.dockerignore
*/.git
*/.gitignore
*/README.md
**/build
**/.nuxt
**/node_modules
**/Dockerfile
**/docker-compose*
**/.dockerignore
**/.git
**/.gitignore
**/README.md
*/LICENSE
*/.vscode
*/Makefile
*/helm-charts
#*/.env
*/.editorconfig
**/.editorconfig
*/dist
**/.output
**/.idea
*/coverage*
.gradle
Expand All @@ -21,4 +23,4 @@
#**.png
#**.jpeg
#**.jpg
*/k8s
**/k8s
26 changes: 15 additions & 11 deletions waltid-applications/waltid-web-wallet/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,32 +1,36 @@
# use the official Bun image
# see all versions at https://hub.docker.com/r/oven/bun/tags
FROM oven/bun:1 as base

FROM gplane/pnpm:9.6 AS base
#FROM oven/bun:1 AS base

WORKDIR /app

# install dependencies into temp directory
# this will cache them and speed up future builds
FROM base AS install
RUN mkdir -p /temp/dev
COPY waltid-applications/waltid-web-wallet/package.json waltid-applications/waltid-web-wallet/bun.lockb /temp/dev/
RUN cd /temp/dev && bun install --frozen-lockfile
#COPY waltid-applications/waltid-web-wallet/package.json waltid-applications/waltid-web-wallet/bun.lockb /temp/dev/
COPY waltid-applications/waltid-web-wallet/package.json waltid-applications/waltid-web-wallet/pnpm-lock.yaml /temp/dev/
RUN cd /temp/dev && pnpm install --frozen-lockfile

# install with --production (exclude devDependencies)
RUN mkdir -p /temp/prod
COPY waltid-applications/waltid-web-wallet/package.json waltid-applications/waltid-web-wallet/bun.lockb /temp/prod/
RUN cd /temp/prod && bun install --frozen-lockfile --production
#COPY waltid-applications/waltid-web-wallet/package.json waltid-applications/waltid-web-wallet/bun.lockb /temp/prod/
COPY waltid-applications/waltid-web-wallet/package.json waltid-applications/waltid-web-wallet/pnpm-lock.yaml /temp/prod/
# RUN cd /temp/prod && pnpm install --frozen-lockfile --production
RUN cd /temp/prod && pnpm install --frozen-lockfile --production

# copy node_modules from temp directory
# then copy all (non-ignored) project files into the image
FROM base AS prerelease
COPY --from=install /temp/dev/node_modules node_modules
COPY waltid-applications/waltid-web-wallet/ .
RUN ls

RUN ls -la

# [optional] tests & build
ENV NODE_ENV=production
RUN bun test
RUN bun run build
RUN pnpm run build

# copy production dependencies and source code into final image
FROM base AS release
Expand All @@ -36,7 +40,7 @@ COPY --from=prerelease /app/package.json .

# run the app
RUN chmod -R a+r .
USER bun
USER app
EXPOSE 7101/tcp
ENV PORT=7101
ENTRYPOINT [ "bun", "run", "server/index.mjs" ]
ENTRYPOINT [ "pnpm", "run", "server/index.mjs" ]
2 changes: 1 addition & 1 deletion waltid-applications/waltid-web-wallet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ cd docker-compose && docker compose up

Update the containers by running the following commands from the root folder:
```bash
docker build -f waltid-web-wallet/Dockerfile -t waltid/waltid-web-wallet .
docker build -f waltid-applications/waltid-web-wallet/Dockerfile -t waltid/waltid-web-wallet .
```
Note that this is project only the frontend of the web-wallet. The corresponding backend is in the /waltid-wallet-api folder.

Expand Down
Binary file modified waltid-applications/waltid-web-wallet/bun.lockb
Binary file not shown.
Loading

0 comments on commit 8734205

Please sign in to comment.