Skip to content

Commit

Permalink
improve docker functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
jchartrand committed Apr 23, 2024
1 parent 1e0de49 commit 9e1c2d4
Show file tree
Hide file tree
Showing 11 changed files with 7,379 additions and 17,859 deletions.
20 changes: 19 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1 +1,19 @@
**/*.env
**/*.env
.git
.github
.husky
coverage
logs
node_modules
.dockerignore
.editorconfig
.eslintrc.cjs
.gitignore
.lintstagedrc.json
.prettierignore
.prettierrc.js
compose-test.yaml
Dockerfile
README
server-dev-only.cert
server-dev-only.key
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# signing-service Changelog

## 0.3.0 - 2024-04-22
### Changed
- add healthz endpoint for use with docker HEALTHCHECK
- update README
- update .dockerignore
- update Dockerfile with multistage production build
- removed unused status package
- update issuer-core import to instead use issuer-instance from npm
- added CHANGELOG

For previous history, see Git commits.
20 changes: 15 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
FROM node:18-alpine
FROM node:18 as builder
ADD . /app
ENV NODE_ENV=production
WORKDIR /app
COPY . .
RUN npm install
CMD ["node", "server.js"]
EXPOSE 4006
RUN npm install

FROM gcr.io/distroless/nodejs18-debian11
COPY --from=builder /app/node_modules /app/node_modules
COPY --from=builder /app/server.js /app/server.js
COPY --from=builder /app/src /app/src
COPY --from=builder /app/package.json /app/package.json

CMD ["app/server.js"]

EXPOSE 4006

6 changes: 6 additions & 0 deletions Dockerfile.local
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM node:20
WORKDIR /app
COPY . .
RUN npm install
CMD ["node", "server.js"]
EXPOSE 4006
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ You can try this signing-service in about three minutes:
2. From a terminal prompt, run:

```
docker run -dp 4006:4006 digitalcredentials/signing-service:0.2.0
docker run -dp 4006:4006 digitalcredentials/signing-service:0.3.0
```

You can now issue test credentials as explained in the [Sign a Credential](#sign-a-credential) section.
Expand Down
Loading

0 comments on commit 9e1c2d4

Please sign in to comment.