Skip to content

Commit

Permalink
update to use latest beta of credential-status-manager-db
Browse files Browse the repository at this point in the history
  • Loading branch information
jchartrand committed Sep 3, 2024
1 parent 12a3679 commit 30acc6f
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 4 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -108,4 +108,7 @@ dist
.tern-port

# vscode
.vscode
.vscode

compose.yaml
compose-local-mongo.yaml
21 changes: 19 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
FROM node:18-alpine
# Stage 1 - Gather dependencies
#FROM node:19 AS deps
#COPY . .
#RUN npm ci

# Stage 2 - Runner
#FROM node:20-alpine as runner
FROM node:20
# RUN git config --global url."https://github.com/".insteadOf '[email protected]:'
# RUN git config --global url."https://github.com/".insteadOf [email protected]:
# RUN git config --global url."https://".insteadOf git://
#RUN git config --global url."https://github.com/".insteadOf ssh://[email protected]
# RUN git config --global url."https://github.com".insteadOf "ssh://[email protected]"
# NOTE to self: I got this to work (i.e., fixed the problem with the docker build
# not being able to pull the status dependency -
# digitalcredentials/credential-status-manager-db#initial-implementation
# from git ) by instead pulling in the dependency locally so it gets copied
# directly into the docker build as part of copying in all of the local node_modules.
# I also therefore had to remove node_moduels from the dockerignore
WORKDIR /app
COPY . .
RUN npm install
CMD ["node", "server.js"]
EXPOSE 4008
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"test": "NODE_OPTIONS=--experimental-vm-modules npx mocha --timeout 10000 -r dotenv/config dotenv_config_path=src/test-fixtures/.env.testing src/app.test.js "
},
"dependencies": {
"@digitalcredentials/credential-status-manager-db": "digitalcredentials/credential-status-manager-db#initial-implementation",
"@digitalcredentials/credential-status-manager-db": "^0.0.1-beta.1",
"cookie-parser": "~1.4.4",
"cors": "^2.8.5",
"debug": "~2.6.9",
Expand Down
2 changes: 2 additions & 0 deletions src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ export async function build(opts = {}) {
const vcWithStatus = await status.allocateRevocationStatus(vc);
return res.json(vcWithStatus);
} catch (e) {

console.log(e)
// We catch the async errors and pass them to the error handler.
if (!e.message) {
e.message = 'Unable to allocate status position.'
Expand Down

0 comments on commit 30acc6f

Please sign in to comment.