Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: add db migration service #48

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions coprocessor/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,7 @@ else ifeq ($(CENTRALIZED_KMS),true)
else
@echo "CENTRALIZED_KMS is set to an unrecognized value: $(CENTRALIZED_KMS)"
endif
cp -v network-fhe-keys/* $(COPROCESSOR_PATH)/fhevm-engine/fhevm-keys
cd $(COPROCESSOR_PATH)/fhevm-engine/coprocessor && make init


COMPOSE_PROJECT_NAME=zama-kms-gateway docker compose -vvv -f docker-compose/docker-compose-db-migration.yml up -d --wait
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, using COMPOSE_PROJECT_NAME!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's not ideal, because it will show a warning that the other containers are orphan (just ignore it), but it's a workaround until we integrate it with coprocessor docker compose


run-coprocessor: $(WORKDIR)/ check-coprocessor check-all-test-repo
cd $(COPROCESSOR_PATH)/fhevm-engine/coprocessor && make cleanup
Expand Down
14 changes: 14 additions & 0 deletions coprocessor/docker-compose/docker-compose-db-migration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
services:
migration:
container_name: migration
image: ghcr.io/zama-ai/fhevm-db-migration:v1
environment:
DATABASE_URL: postgresql://postgres:postgres@zama-kms-gateway-db-1:5432/coprocessor
volumes:
- ../network-fhe-keys/:/fhevm-keys/
networks:
- zama-kms-gateway_default

networks:
zama-kms-gateway_default:
external: true