Skip to content

Commit

Permalink
Merge branch 'next' into feat/enveloping_proof
Browse files Browse the repository at this point in the history
  • Loading branch information
ldhyen99 authored Jul 30, 2024
2 parents c37d301 + 3c359dc commit 33f2e72
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 17 deletions.
26 changes: 14 additions & 12 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
name: package

on:
# push:
# branches:
# - next
# - cd_*
# tags:
# - "v[0-9]+.[0-9]+.[0-9]+"
# pull_request:

push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
workflow_dispatch:

env:
CI: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4


- name: node_setup
uses: actions/setup-node@v4
with:
node-version: 20.12.2

- name: docker meta details
id: meta
uses: docker/metadata-action@v5
Expand All @@ -27,7 +29,7 @@ jobs:
flavor: |
latest=auto
tags: |
type=latest,branch=main
type=edge,branch=next
type=semver,pattern={{version}}
type=sha
Expand All @@ -44,10 +46,10 @@ jobs:
- name: Push Release
uses: docker/build-push-action@v5
with:
push: ${{ startsWith(github.ref, 'refs/tags/') }}
push: ${{ startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/next' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
target: train_package
target: vckit-api
# build-args: |


2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ COPY package.json .
COPY pnpm-lock.yaml .
COPY pnpm-workspace.yaml .
COPY lerna.json .
COPY agent.template.yml .
COPY packages/cli/default/agent.template.yml .
COPY entrypoint.sh .

COPY packages/tsconfig.json packages/
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ docker build -t vckit-api .

You can customize the Docker image build process by specifying a custom configuration file path for the VCkit API.
Ensure that you have the custom configuration file (`<config_path>`) ready. This file should contain the necessary settings and configurations for the VCkit API.
Use the `--build-arg` flag to specify the `DATABASE_TYPE`, `DATABASE_USERNAME`, `DATABASE_PASSWORD`, `DATABASE_NAME`, `DATABASE_HOST`, `DATABASE_PORT`, `DATABASE_ENCRYPTION_KEY`, `PORT`, `PROTOCOL`, and `API_DOMAIN` build arguments when running the docker build command.
Use the `--build-arg` flag to specify the `DATABASE_TYPE`, `DATABASE_USERNAME`, `DATABASE_PASSWORD`, `DATABASE_NAME`, `DATABASE_HOST`, `DATABASE_PORT`, `DATABASE_ENCRYPTION_KEY`, `PORT`, `PROTOCOL`, `API_DOMAIN`, and `API_KEY` build arguments when running the docker build command.

```bash
docker build \
Expand All @@ -101,6 +101,7 @@ docker build \
--build-arg PORT=3332 \
--build-arg PROTOCOL=http \
--build-arg API_DOMAIN=localhost:3332 \
--build-arg API_KEY=test123 \
-t vckit-api .
```

Expand Down
2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
echo "Updating agent.yml with environment variables..."

# Replace variables in the agent.yml file with the exported environment variables
envsubst '${DATABASE_TYPE},${DATABASE_NAME},${DATABASE_HOST},${DATABASE_PORT},${DATABASE_USERNAME},${DATABASE_PASSWORD},${DATABASE_ENCRYPTION_KEY},${PORT},${PROTOCOL},${API_DOMAIN}' < /app/agent.template.yml > /app/agent.yml
envsubst '${DATABASE_TYPE},${DATABASE_NAME},${DATABASE_HOST},${DATABASE_PORT},${DATABASE_USERNAME},${DATABASE_PASSWORD},${DATABASE_ENCRYPTION_KEY},${PORT},${PROTOCOL},${API_DOMAIN},${API_KEY}' < /app/agent.template.yml > /app/agent.yml

echo "Agent.yml updated."

Expand Down
3 changes: 2 additions & 1 deletion local.env
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ DATABASE_PORT=5432
DATABASE_ENCRYPTION_KEY=29739248cad1bd1a0fc4d9b75cd4d2990de535baf5caadfdf8d8f86664aa830c
PORT=3332
PROTOCOL=http
API_DOMAIN=localhost:3332
API_DOMAIN=localhost:3332
API_KEY=test1234
2 changes: 1 addition & 1 deletion packages/cli/default/agent.template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ server:
- - /agent
- $require: '@vckit/remote-server?t=function#apiKeyAuth'
$args:
- apiKey: test123
- apiKey: ${API_KEY}

- $require: '@vckit/encrypted-storage?t=function#encryptedStoreMiddleware'
$args:
Expand Down

0 comments on commit 33f2e72

Please sign in to comment.