-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(rest)!: upgrade to credo 0.5 (#256)
Signed-off-by: Matthew Dean <[email protected]> Signed-off-by: Timo Glastra <[email protected]> Co-authored-by: Matthew Dean <[email protected]> Co-authored-by: Ariel Gentile <[email protected]> BREAKING CHANGE: - Upgrade rest package to credo 0.5.0 - Replace Indy SDK with Aries Askar, Indy VDR & AnonCreds RS - This upgrade is incompatible with the previous version of the rest package using AFJ/Credo 0.2 (`@aries-framework/rest` v0.9). - Complete rewrite of all endpoints - Added support for multi-tenancy
- Loading branch information
1 parent
70734e5
commit 3849aec
Showing
103 changed files
with
16,385 additions
and
12,864 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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 |
---|---|---|
|
@@ -4,4 +4,4 @@ build | |
.idea | ||
coverage | ||
CHANGELOG.md | ||
routes | ||
generated |
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
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 |
---|---|---|
@@ -1,40 +1,49 @@ | ||
FROM ubuntu:18.04 as base | ||
FROM node:20 as all-dependencies | ||
|
||
ENV DEBIAN_FRONTEND noninteractive | ||
WORKDIR /all-dependencies | ||
|
||
RUN apt-get update -y && apt-get install -y \ | ||
software-properties-common \ | ||
apt-transport-https \ | ||
curl \ | ||
# Only needed to build indy-sdk | ||
build-essential | ||
# Copy files required for yarn install | ||
COPY package.json package.json | ||
COPY yarn.lock yarn.lock | ||
COPY packages/rest/package.json packages/rest/package.json | ||
|
||
# libindy | ||
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CE7709D068DB5E88 | ||
RUN add-apt-repository "deb https://repo.sovrin.org/sdk/deb bionic stable" | ||
# Install dependencies | ||
RUN yarn install | ||
|
||
# nodejs | ||
RUN curl -sL https://deb.nodesource.com/setup_16.x | bash | ||
# The build stage installs all node_modules (also dev) | ||
# and build the JS files to run the REST server | ||
FROM all-dependencies as build | ||
|
||
# yarn | ||
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \ | ||
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list | ||
# Copy remaining files for rest package and build the JS files | ||
COPY tsconfig.build.json tsconfig.build.json | ||
COPY packages/rest packages/rest | ||
WORKDIR /all-dependencies/packages/rest | ||
RUN yarn build | ||
|
||
# install depdencies | ||
RUN apt-get update -y && apt-get install -y --allow-unauthenticated \ | ||
libindy \ | ||
nodejs | ||
# The production-dependencies stage installs only the production node_modules | ||
# It is based on the all-dependencies so it can use the yarn-cache and doesn't | ||
# have to re-fetch all deps (as prod deps are a subset of all deps) | ||
FROM all-dependencies as production-dependencies | ||
|
||
# Install yarn seperately due to `no-install-recommends` to skip nodejs install | ||
RUN apt-get install -y --no-install-recommends yarn | ||
WORKDIR /production-dependencies | ||
|
||
# Credo specifc setup | ||
WORKDIR /www | ||
COPY packages/rest/package.json package.json | ||
COPY yarn.lock yarn.lock | ||
|
||
COPY bin ./bin | ||
COPY package.json package.json | ||
RUN yarn install --production | ||
|
||
COPY build ./build | ||
FROM node:20 as final | ||
|
||
WORKDIR /app | ||
|
||
# Copy build files | ||
COPY --from=build /all-dependencies/packages/rest/build build | ||
|
||
# Copy dependencies | ||
COPY --from=production-dependencies /production-dependencies/node_modules node_modules | ||
|
||
# Copy source files | ||
COPY packages/rest/bin bin | ||
COPY packages/rest/package.json package.json | ||
|
||
ENTRYPOINT [ "./bin/credo-rest.js", "start" ] |
Oops, something went wrong.