Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve docker functionality #28

Merged
merged 1 commit into from
Apr 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading