From dbffcb233e81d2e1cdb106c940567157305833b7 Mon Sep 17 00:00:00 2001 From: zramsay Date: Wed, 22 Nov 2023 19:34:44 -0500 Subject: [PATCH] ping pub --- .../data/compose/docker-compose-ping-pub.yml | 8 ++++++++ .../data/container-build/cerc-ping-pub/Dockerfile | 11 +++++++++++ .../data/container-build/cerc-ping-pub/build.sh | 8 ++++++++ stack_orchestrator/data/stacks/ping-pub/README.md | 9 +++++++++ stack_orchestrator/data/stacks/ping-pub/stack.yml | 8 ++++++++ 5 files changed, 44 insertions(+) create mode 100644 stack_orchestrator/data/compose/docker-compose-ping-pub.yml create mode 100644 stack_orchestrator/data/container-build/cerc-ping-pub/Dockerfile create mode 100755 stack_orchestrator/data/container-build/cerc-ping-pub/build.sh create mode 100644 stack_orchestrator/data/stacks/ping-pub/README.md create mode 100644 stack_orchestrator/data/stacks/ping-pub/stack.yml diff --git a/stack_orchestrator/data/compose/docker-compose-ping-pub.yml b/stack_orchestrator/data/compose/docker-compose-ping-pub.yml new file mode 100644 index 00000000..ae855f4a --- /dev/null +++ b/stack_orchestrator/data/compose/docker-compose-ping-pub.yml @@ -0,0 +1,8 @@ +version: "3.2" + +services: + ping-pub: + image: cerc/ping-pub:local + restart: always + ports: + - "5137" diff --git a/stack_orchestrator/data/container-build/cerc-ping-pub/Dockerfile b/stack_orchestrator/data/container-build/cerc-ping-pub/Dockerfile new file mode 100644 index 00000000..4015ae89 --- /dev/null +++ b/stack_orchestrator/data/container-build/cerc-ping-pub/Dockerfile @@ -0,0 +1,11 @@ +FROM node:lts-slim + +WORKDIR /app + +COPY . . + +RUN yarn --ignore-engines + +EXPOSE 5173 + +CMD ["yarn", "serve"] diff --git a/stack_orchestrator/data/container-build/cerc-ping-pub/build.sh b/stack_orchestrator/data/container-build/cerc-ping-pub/build.sh new file mode 100755 index 00000000..8efbf462 --- /dev/null +++ b/stack_orchestrator/data/container-build/cerc-ping-pub/build.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +# Build the ping pub image +source ${CERC_CONTAINER_BASE_DIR}/build-base.sh + +# See: https://stackoverflow.com/a/246128/1701505 +SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) + +docker build -t cerc/ping-pub:local ${build_command_args} -f ${SCRIPT_DIR}/Dockerfile $SCRIPT_DIR diff --git a/stack_orchestrator/data/stacks/ping-pub/README.md b/stack_orchestrator/data/stacks/ping-pub/README.md new file mode 100644 index 00000000..673b1843 --- /dev/null +++ b/stack_orchestrator/data/stacks/ping-pub/README.md @@ -0,0 +1,9 @@ +# ping-pub + +``` +laconic-so --stack ping-pub setup-repositories +laconic-so --stack ping-pub build-containers +laconic-so --stack ping-pub deploy init --output ping-pub-spec.yml --map-ports-to-host localhost-same +laconic-so --stack ping-pub deploy create --spec-file ping-pub-spec.yml --deployment-dir pp-deployment +laconic-so deployment --dir pp-deployment start +``` diff --git a/stack_orchestrator/data/stacks/ping-pub/stack.yml b/stack_orchestrator/data/stacks/ping-pub/stack.yml new file mode 100644 index 00000000..44ee5732 --- /dev/null +++ b/stack_orchestrator/data/stacks/ping-pub/stack.yml @@ -0,0 +1,8 @@ +version: "0.1" +name: ping-pub +repos: + - github.com/LaconicNetwork/explorer@laconic +containers: + - cerc/ping-pub +pods: + - ping-pub