-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #119 from hypersign-protocol/develop
Develop
- Loading branch information
Showing
66 changed files
with
3,045 additions
and
3,616 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -2,4 +2,4 @@ Dockerfile | |
.dockerignore | ||
docker-compose.yml | ||
./node_modules | ||
# .env | ||
.env |
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 |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: Studio API Release Docker Workflow | ||
|
||
on: push | ||
|
||
permissions: | ||
contents: write | ||
packages: write | ||
|
||
jobs: | ||
publish-docker: | ||
name: Publish Docker Image (linux/amd64) | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set Latest Tag | ||
run: echo "LATEST_RELEASE_TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.19 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
id: buildx | ||
with: | ||
version: latest | ||
|
||
- name: Docker Login | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Prepare Docker Metadata | ||
id: docker-build | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: ghcr.io/${{ github.repository}} | ||
flavor: | | ||
latest=auto | ||
tags: | | ||
type=semver,pattern={{version}},value=${{ env.LATEST_RELEASE_TAG }} | ||
labels: | | ||
org.opencontainers.image.vendor="Hypermine Limited" | ||
- name: Build and push image | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: . | ||
platforms: linux/amd64 | ||
push: true | ||
tags: ${{ steps.docker-build.outputs.tags }} | ||
labels: ${{ steps.docker-build.outputs.labels }} |
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,15 +1,10 @@ | ||
FROM node:16 | ||
WORKDIR /usr/src/app | ||
COPY ./package.json . | ||
COPY ./yarn.lock . | ||
COPY ./tsconfig.json . | ||
RUN yarn | ||
# RUN yarn build:nest | ||
COPY . . | ||
CMD ["yarn", "start:dev"] | ||
|
||
|
||
|
||
|
||
|
||
# using npm instead of yarn | ||
RUN npm install | ||
COPY . . | ||
CMD ["npm","run","start:dev"] | ||
|
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,121 +1,58 @@ | ||
version: '3.9' | ||
|
||
services: | ||
|
||
# MongoDB services | ||
entity_db: | ||
container_name: entity_db | ||
image: mongo:latest | ||
restart: always | ||
volumes: | ||
- entity_db:/data/db | ||
|
||
# EDV service | ||
edv.service.id: | ||
container_name: edv.service.id | ||
build: /Users/hermit/code/hm/hs/hypersign-edv-service | ||
version: "3.9" | ||
services: | ||
issuer-database: | ||
container_name: "issuer-database" | ||
image: "mongo:latest" | ||
ports: | ||
- "27017:27017" | ||
restart: "always" | ||
volumes: | ||
- "issuer-database:/data/db" | ||
edv.entity.id: | ||
container_name: "edv.entity.id" | ||
image: "ghcr.io/hypersign-protocol/hypersign-data-vault-service:latest" | ||
environment: | ||
PORT: 3002 | ||
HOST: edv.service.id:3002 | ||
PORT: 3000 | ||
HOST: "edv.entity.id:3000" | ||
SSL: false | ||
ABSOULTE_URL: edv.service.id:3002 | ||
DATA_VAULT: './.encData' | ||
DB_URL: mongodb://entity_db:27017/test | ||
depends_on: | ||
- entity_db | ||
|
||
# Entity API service | ||
api.entity.id: | ||
container_name: api.entity.id | ||
build: . | ||
ports: | ||
- 3001:3001 | ||
ABSOLUTE_URL: "edv.entity.id:3000" | ||
DATA_VAULT: "./.encData" | ||
DB_URL: "mongodb://issuer-database:27017" | ||
depends_on: | ||
- "issuer-database" | ||
api.entity.id: | ||
container_name: "api.entity.id" | ||
image: "ghcr.io/hypersign-protocol/studio-api:latest" | ||
environment: | ||
DATABASE_CONNECTION_PATH: mongodb://entity_db:27017/admin | ||
HID_NETWORK_RPC: https://rpc.jagrat.hypersign.id/ | ||
HID_NETWORK_API: https://api.jagrat.hypersign.id/ | ||
HID_NETWORK_NAMESPACE: testnet | ||
EDV_BASE_URL: http://edv.service.id:3002 | ||
EDV_CONFIG_DIR: '.api-edv-config' | ||
EDV_DID_FILE_PATH: '.api-edv-config/edv-did.json' | ||
EDV_KEY_FILE_PATH: '.api-edv-config/edv-keys.json' | ||
MNEMONIC: 'parade erase firm goose old elegant sausage sweet stuff view goddess total museum hidden worry usual rug foster uncover cradle govern swing muscle unable' | ||
JWT_SECRET: '76JpMGuSf0ejzi4OFHpe' | ||
WHITELISTED_CORS: '["http://localhost:9001","https://entity.hypersign.id","http://localhost:3001","https://api.entity.hypersign.id"]' | ||
STUDIO_SERVER_JWT_SECRET: 00c2c433-a077-4e68-b19c-1234f014a510 | ||
depends_on: | ||
- entity_db | ||
- edv.service.id | ||
|
||
# Entity Studio Service | ||
studio.server.id: | ||
container_name: studio.server.id | ||
build: /Users/hermit/code/hm/hs/studio/server | ||
ports: | ||
- 9000:9000 | ||
environment: | ||
NODE_ENV: development | ||
PORT: 9000 | ||
HOST: localhost | ||
LOG_FILEPATH: ./log/studio-server.log | ||
LOG_DIR: ./log | ||
LOG_TIMESTAMP_FORMAT: 'YYYY-MM-DD HH:mm:ss.SSS' | ||
LOG_LEVEL: debug | ||
DATABASE_FILEPATH: ./db/studio-server.db | ||
DID_METHOD_NAME: hs | ||
DID_PREFIX: did | ||
JWT_SECRET: my\$ecreEtKeY@123 | ||
STUDIO_SERVER_BASE_URL: http://studio.server.id | ||
NODE_SERVER_BASE_URL: http://localhost:5000/ | ||
NODE_SERVER_DID_CREATE_EP: api/did/create_tmp | ||
NODE_SERVER_SCHEMA_CREATE_EP: api/schema/create | ||
MAIL_HOST: smtp.gmail.com | ||
MAIL_PORT: 65 | ||
MAIL_USERNAME: [email protected] | ||
MAIL_PASSWORD: examplePassw00rd1@ | ||
MAIL_NAME: 'Hypersign Admin' | ||
DB_URL: mongodb://entity_db:27017/studio-server | ||
WALLET_WEB_HOOK: http://studio.server.id/api/v1/schema/status | ||
WALLET_WEB_HOOK_CREAD: http://studio.server.id/api/v1/credential/status | ||
ACCEPTANCE_URL: http://studio.server.id/deeplink.html?deeplink=hypersign:deeplink?url= | ||
PATH_TO_ISSUE_CRED: api/v1/credential/walletAccepct | ||
WALLET_WEB_HOOK_ORG_DID: http://studio.server.id/api/v1/org/status | ||
ORG_SERVICE_END_POINT: http://studio.server.id/api/v1/org/ | ||
SSE_CLIENT_URL: http://localhost:9001 | ||
WHITELISTED_CORS: '["http://studio.server.id","http://localhost:9001","http://192.168.29.12:9001", "https://localhost:9001", "http://192.168.29.209:9001", "http://entity.hypersign.id","https://entity.hypersign.id","http://localhost:9001", "https://wallet-stage.hypersign.id", "http://localhost:4999","192.168.29.13","http://localhost:1234","http://localhost:4000", "*"]' | ||
SCHEMA_RESOLVER: https://api.jagrat.hypersign.id/hypersign-protocol/hidnode/ssi/schema/ | ||
depends_on: | ||
- entity_db | ||
|
||
# Entity Studio FrontEnd | ||
studio.ui: | ||
container_name: studio.ui | ||
build: /Users/hermit/code/hm/hs/studio-frontend | ||
ports: | ||
- 9001:80 | ||
environment: | ||
NODE_ENV: development | ||
VUE_APP_TITLE: 'Entity Studio' | ||
VUE_APP_DESC: 'A portal to issue and verify credentials on Hypersign Identity network!' | ||
VUE_APP_VERSION: v1.0 | ||
VUE_APP_STUDIO_SERVER_BASE_URL: http://localhost:9000/ | ||
VUE_APP_STUDIO_SERVER_BASE_WS: ws://localhost:9000/ | ||
VUE_APP_NODE_SERVER_BASE_URL: https://rpc.jagrat.hypersign.id/ | ||
VUE_APP_NODE_SERVER_BASE_URL_REST: https://api.jagrat.hypersign.id/ | ||
VUE_APP_SCHEMA_GET_EP_REST: hypersign-protocol/hidnode/ssi/schema/ | ||
VUE_APP_ACCPCT_CRED_EP: api/v1/credential/send | ||
VUE_APP_EXPLORER_BASE_URL: https://explorer.hypersign.id/ | ||
VUE_APP_STUDIO_SERVER_SAVE_SCHEMA: api/v1/schema | ||
VUE_APP_SCHEMA_LIST_EP: api/v1/schema | ||
VUE_APP_STUDIO_SERVER_CRED_LIST_EP: api/v1/credential/org | ||
VUE_APP_STUDIO_SERVER_CRED_ISSUE_EP: api/v1/credential | ||
VUE_APP_WEB_WALLET_ADDRESS: https://wallet-stage.hypersign.id | ||
VUE_APP_PRESENTATION_TEMPLATE_EP: api/v1/presentation/template | ||
VUE_APP_SSE: http://localhost:9000/ | ||
VUE_APP_STUDIO_API_SERVER_HOST: http://localhost:3001 | ||
depends_on: | ||
- studio.server.id | ||
- api.entity.id | ||
|
||
volumes: | ||
entity_db: {} | ||
PORT: 3001 | ||
ENTITY_API_SERVICE_BASE_URL: "http://localhost:8080/" | ||
DATABASE_CONNECTION_PATH: "mongodb://issuer-database:27017/api?retryWrites=true&w=majority" | ||
BASE_DB_PATH: "mongodb://issuer-database:27017" | ||
HID_NETWORK_RPC: "https://rpc.jagrat.hypersign.id/" | ||
HID_NETWORK_API: "https://api.jagrat.hypersign.id/" | ||
HID_NETWORK_NAMESPACE: "testnet" | ||
EDV_BASE_URL: "http://edv.entity.id:3000/" | ||
EDV_CONFIG_DIR: ".api-edv-config" | ||
EDV_DID_FILE_PATH: ".api-edv-config/edv-did.json" | ||
EDV_KEY_FILE_PATH: ".api-edv-config/edv-keys.json" | ||
MNEMONIC: "parade erase firm goose old elegant sausage sweet stuff view goddess total museum hidden worry usual rug foster uncover cradle govern swing muscle unable" | ||
JWT_SECRET: "43bf9ba55e72565c35a2cd5ac52792ca965cb806be2027c5d83bd11ab826aaf250c8bcedc851cf54b059fbe800daeb02f801c395f306bc42a6f28be15b94e0ed" | ||
WHITELISTED_CORS: "[\"http://localhost:9001\",\"https://entity.hypersign.id\",\"http://localhost:3001\",\"https://api.entity.hypersign.id\"]" | ||
STUDIO_SERVER_JWT_SECRET: "caXHr6Xhz3teM2S75HmgNzjgpp7EHnrFyga6jWgyjpgSvqKCv1" | ||
SUPER_ADMIN_USERNAME: "root" | ||
SUPER_ADMIN_PASSWORD: "root" | ||
SESSION_SECRET_KEY: "43bf9ba55e72565d" | ||
depends_on: | ||
- "issuer-database" | ||
- "edv.entity.id" | ||
web: | ||
container_name: "nginx" | ||
image: "nginx:latest" | ||
ports: | ||
- "8080:8080" | ||
depends_on: | ||
- "api.entity.id" | ||
volumes: | ||
- "./nginx/nginx.conf:/etc/nginx/nginx.conf" | ||
volumes: | ||
issuer-database: {} |
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
|
||
worker_processes 1; | ||
|
||
events { | ||
worker_connections 1024; | ||
} | ||
|
||
|
||
http { | ||
include mime.types; | ||
default_type application/octet-stream; | ||
|
||
sendfile on; | ||
keepalive_timeout 65; | ||
|
||
server { | ||
listen 8080; | ||
server_name localhost *.localhost; | ||
|
||
set $subdomain ""; | ||
if ($host ~ ^(.*)\.localhost$) { | ||
set $subdomain $1; | ||
} | ||
|
||
location / { | ||
proxy_pass http://ssi-api:3001; | ||
proxy_set_header X-Subdomain $subdomain; | ||
} | ||
|
||
error_page 500 502 503 504 /50x.html; | ||
location = /50x.html { | ||
root html; | ||
} | ||
} | ||
include servers/*; | ||
} |
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
Oops, something went wrong.