Skip to content
Snippets Groups Projects
Verified Commit 221e5385 authored by Konstantin Tsabolov's avatar Konstantin Tsabolov
Browse files

chore: move docker compose to root. Refs #27

parent 45595e8d
No related branches found
No related tags found
No related merge requests found
......@@ -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
# ocm-engine version 1
# Organizational Credential Manager (v2)
#### Dependencies
## Overview
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)
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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment