Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
OCM-Engine
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Konstantin Tsabolov
OCM-Engine
Commits
221e5385
Verified
Commit
221e5385
authored
1 year ago
by
Konstantin Tsabolov
Browse files
Options
Downloads
Patches
Plain Diff
chore: move docker compose to root. Refs #27
parent
45595e8d
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Dockerfile
+1
-20
1 addition, 20 deletions
Dockerfile
README.md
+41
-13
41 additions, 13 deletions
README.md
docker-compose.yml
+97
-0
97 additions, 0 deletions
docker-compose.yml
with
139 additions
and
33 deletions
Dockerfile
+
1
−
20
View file @
221e5385
...
...
@@ -8,16 +8,6 @@ WORKDIR ${APP_HOME}
RUN
corepack
enable
# # libindy build
# FROM node:20-bullseye AS ssi-base
# RUN apt-get update \
# && apt-get install -y --no-install-recommends libsodium-dev libzmq3-dev
# RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain '1.58.0'
# RUN git clone https://github.com/hyperledger/indy-sdk
# RUN cd indy-sdk/libindy && ~/.cargo/bin/cargo build --release
# RUN cd indy-sdk/libindy && mv target/release/libindy.so /usr/lib/libindy.so
# Build
FROM
base
AS
build
...
...
@@ -37,15 +27,6 @@ RUN pnpm --filter ${SERVICE} build:production
RUN
pnpm
--filter
${
SERVICE
}
--prod
deploy build
RUN
pnpm
--filter
shared
--prod
deploy shared
# This is a way of keeping the generated prisma client in the build folder
RUN if
[
-d
./apps/
${
SERVICE
}
/node_modules/
\@
prisma/client
]
;
then
\
GLOBAL_PRISMA_SETUP
=
`
realpath
./apps/
${
SERVICE
}
/node_modules/
\@
prisma/client
`
\
GLOBAL_PRISMA_CLIENT
=
`
readlink
-f
${
GLOBAL_PRISMA_SETUP
}
/../../.prisma
`
\
BUILD_PRISMA_SETUP
=
`
realpath
./build/node_modules/
\@
prisma/client
`
\
BUILD_PRISMA_CLIENT
=
`
readlink
-f
${
BUILD_PRISMA_SETUP
}
/../..
`
\
sh
-c
'cp -r $GLOBAL_PRISMA_CLIENT $BUILD_PRISMA_CLIENT'
;
\
fi
# Final
FROM
node:20
AS
final
...
...
@@ -69,4 +50,4 @@ RUN node -e "\
fs.writeFileSync('./package.json', JSON.stringify({ name, version, type }, null, 2));
\
"
#
USER node
USER
node
This diff is collapsed.
Click to expand it.
README.md
+
41
−
13
View file @
221e5385
#
ocm-engine version 1
#
Organizational Credential Manager (v2)
##
##
Dependenc
ie
s
##
Overv
ie
w
Node 12
Python 2.5.0 >= <3.0.0
pnpm
OCM (Organizational Credential Manager) is a Node.js-based microservice system designed to manage organizational credentials.
##
# Setup local
##
Prerequisites
1.
pnpm install
2.
pnpm
prisma:generate
3.
pnpm /app/:build
*
Node.js (version 20 or later)
*
pnpm
*
Docker and Docker Compose for local development
app options: attestation, connection, principal, ssi
## Installation
### Docker compose
1.
Clone the repository:
1.
Go to compose dir
```
bash
git clone https://gitlab.eclipse.org/eclipse/xfsc/ocm/ocm-engine.git
```
2.
docker-compose up
2.
Navigate to the repository directory:
```
bash
cd
ocm-engine
```
3.
Install dependencies:
```
bash
pnpm i
```
4.
Start the services locally:
```
bash
pnpm
-F
ssi-abstraction start
pnpm
-F
connection-manager start
...
```
5.
Or start the whole stack in Docker Compose:
```
bash
docker compose up
-d
```
## Example Flows (OCM Usage)
Please refer to
[
OCM-flow-overview
](
documentation/ocm-flow-overview.md
)
## License
This project is licensed under the
[
Apache 2.0 License
](
LICENSE
)
This diff is collapsed.
Click to expand it.
compose/
docker-compose.yml
→
docker-compose.yml
+
97
−
0
View file @
221e5385
version
:
'
3.9'
services
:
connection-manager
:
build
:
context
:
..
args
:
-
SERVICE=connection-manager
init
:
true
nats
:
image
:
nats
ports
:
-
'
3003:3003'
env_file
:
./env/connection-manager.env
depends_on
:
-
db
-
nats
-
ssi
-
'
4222:4222'
#Nats server port
-
'
8222:8222'
#Nats server Monitoring port
credential-manager
:
ssi
:
build
:
context
:
..
args
:
-
SERVICE=
credential-manager
-
SERVICE=
ssi-abstraction
init
:
true
ports
:
-
'
3011:3011'
env_file
:
./env/credential-manager.env
-
'
3009:3009'
-
'
3010:3010'
-
'
4000:4000'
environment
:
NATS_URL
:
nats://nats:4222
PORT
:
3009
AGENT_NAME
:
ssi-abstraction-agent
AGENT_WALLET_ID
:
ssi-wallet-id
AGENT_WALLET_KEY
:
ssi-wallet-key
AGENT_HOST
:
http://ssi
AGENT_PUBLIC_DID_SEED
:
6b8b882e2618fa5d45ee7229ca000000
AGENT_AUTO_ACCEPT_CONNECTION
:
true
AGENT_AUTO_ACCEPT_CREDENTIAL
:
contentApproved
AGENT_LEDGER_ID
:
BCOVRIN_TEST
depends_on
:
-
db
-
nats
-
ssi
schema-manager
:
build
:
context
:
..
args
:
-
SERVICE=schema-manager
init
:
true
environment
:
-
HTTP_PORT=3000
-
NATS_URL=nats://nats:4222
-
NATS_MONITORING_URL=http://nats:8222
-
SSI_AGENT_URL=http://ssi:3009
ports
:
-
'
3013:3013'
env_file
:
./env/schema-manager.env
-
'
4001:3000'
depends_on
:
-
db
-
nats
-
ssi
proof
-manager
:
connection
-manager
:
build
:
context
:
..
args
:
-
SERVICE=
proof
-manager
-
SERVICE=
connection
-manager
init
:
true
environment
:
-
HTTP_PORT=3000
-
NATS_URL=nats://nats:4222
-
NATS_MONITORING_URL=http://nats:8222
-
SSI_AGENT_URL=http://ssi:3009
ports
:
-
'
3007:3007'
env_file
:
./env/proof-manager.env
-
'
4002:3000'
depends_on
:
-
db
-
nats
-
ssi
ssi
:
credential-manager
:
build
:
context
:
..
args
:
-
SERVICE=
ssi-abstraction
-
SERVICE=
credential-manager
init
:
true
environment
:
-
HTTP_HOST=0.0.0.0
-
HTTP_PORT=3000
-
NATS_URL=nats://nats:4222
-
NATS_MONITORING_URL=http://nats:8222
-
SSI_AGENT_URL=http://ssi:3009
ports
:
-
'
3009:3009'
-
'
3010:3010'
-
'
4000:4000'
env_file
:
./env/ssi-abstraction.env
-
'
4003:3000'
depends_on
:
-
db
-
nats
-
ssi
db
:
image
:
postgres:16
volumes
:
-
db-data:/var/lib/postgresql/data
ports
:
-
5432:5432
healthcheck
:
test
:
[
'
CMD'
,
'
pg_isready'
,
'
-q'
,
'
-d'
,
'
postgres'
,
'
-U'
,
'
root'
]
timeout
:
45s
interval
:
10s
retries
:
10
restart
:
always
environment
:
-
POSTGRES_USER=root
-
POSTGRES_PASSWORD=password
nats
:
image
:
nats
ports
:
-
'
4222:4222'
#Nats server port
-
'
8222:8222'
#Nats server Monitering port
volumes
:
db-data
:
# proof-manager:
# build:
# args:
# - SERVICE=proof-manager
# init: true
# environment:
# - HTTP_HOST=0.0.0.0
# - HTTP_PORT=3000
# - NATS_URL=nats://nats:4222
# - NATS_MONITORING_URL=http://nats:8222
# - SSI_AGENT_URL=http://ssi:3000
# ports:
# - '4004:3000'
# depends_on:
# - nats
# - ssi
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment