From 5ee0bdf00ee186dfb551135ed21c88749dea2025 Mon Sep 17 00:00:00 2001 From: Nabarun Date: Wed, 6 Dec 2023 17:36:30 +0530 Subject: [PATCH] Fix mapped ports in deployment for containers --- .../compose/docker-compose-osmosis-front-end.yml | 2 +- stack_orchestrator/data/stacks/osmosis/README.md | 15 +++++++++------ stack_orchestrator/data/stacks/osmosis/stack.yml | 1 + 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/stack_orchestrator/data/compose/docker-compose-osmosis-front-end.yml b/stack_orchestrator/data/compose/docker-compose-osmosis-front-end.yml index 23cea8b4..b3b8aaab 100644 --- a/stack_orchestrator/data/compose/docker-compose-osmosis-front-end.yml +++ b/stack_orchestrator/data/compose/docker-compose-osmosis-front-end.yml @@ -18,7 +18,7 @@ services: osmosis-front-end: condition: service_completed_successfully restart: on-failure - command: ["python3", "-m", "http.server", "-d" ,"/app-builds/osmosis/build", "4000"] + command: ["python3", "-m", "http.server", "-d" ,"/app-builds/osmosis/build", "3000"] volumes: - app_builds:/app-builds ports: diff --git a/stack_orchestrator/data/stacks/osmosis/README.md b/stack_orchestrator/data/stacks/osmosis/README.md index 663516d5..de3f0384 100644 --- a/stack_orchestrator/data/stacks/osmosis/README.md +++ b/stack_orchestrator/data/stacks/osmosis/README.md @@ -22,7 +22,7 @@ Build the container images: # support image for the gitea package registry laconic-so --stack build-support build-containers -laconic-so --stack osmosis build-containers +laconic-so --stack osmosis build-containers ``` ## Create a deployment @@ -38,11 +38,12 @@ Edit `network` in spec file to map container ports to same ports in host ``` ... -ports: - proxy-server: - - '4000:4000' - python-server: - - '3000:3000' +network: + ports: + proxy-server: + - '4000:4000' + python-server: + - '3000:3000' ``` ### Data volumes @@ -91,6 +92,8 @@ laconic-so deployment --dir osmosis-deployment start * List and check the health status of all the containers using `docker ps` and wait for them to be `healthy` +* The web app can be accessed at http://localhost:3000 + ## Laconic registry Setup a test chain: diff --git a/stack_orchestrator/data/stacks/osmosis/stack.yml b/stack_orchestrator/data/stacks/osmosis/stack.yml index cc0e4e77..2362c3cd 100644 --- a/stack_orchestrator/data/stacks/osmosis/stack.yml +++ b/stack_orchestrator/data/stacks/osmosis/stack.yml @@ -5,6 +5,7 @@ repos: - git.vdb.to/cerc-io/hosting@names-for-so - gitea.com/gitea/act_runner # For osmosis frontend + - github.com/cerc-io/watcher-ts@v0.2.78 - github.com/cerc-io/osmosis-frontend@ng-export-static # TODO: Update branch after merge containers: - cerc/act-runner