Update docker build and compose file for console
This commit is contained in:
parent
1e014e6b2e
commit
8ee7040298
@ -2,6 +2,7 @@ services:
|
|||||||
cli:
|
cli:
|
||||||
image: cerc/laconic2-registry-cli:local
|
image: cerc/laconic2-registry-cli:local
|
||||||
environment:
|
environment:
|
||||||
|
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
|
||||||
CERC_LACONICD_RPC_ENDPOINT: ${CERC_LACONICD_RPC_ENDPOINT:-http://laconicd:26657}
|
CERC_LACONICD_RPC_ENDPOINT: ${CERC_LACONICD_RPC_ENDPOINT:-http://laconicd:26657}
|
||||||
CERC_LACONICD_GQL_ENDPOINT: ${CERC_LACONICD_GQL_ENDPOINT:-http://laconicd:9473/api}
|
CERC_LACONICD_GQL_ENDPOINT: ${CERC_LACONICD_GQL_ENDPOINT:-http://laconicd:9473/api}
|
||||||
CERC_CHAIN_ID: ${CERC_CHAIN_ID:-laconic_9000-1}
|
CERC_CHAIN_ID: ${CERC_CHAIN_ID:-laconic_9000-1}
|
||||||
@ -14,12 +15,13 @@ services:
|
|||||||
|
|
||||||
laconic-console:
|
laconic-console:
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
image: cerc/laconic-console-host:local
|
image: cerc/laconic2-console-host:local
|
||||||
environment:
|
environment:
|
||||||
- CERC_WEBAPP_FILES_DIR=${CERC_WEBAPP_FILES_DIR:-/usr/local/share/.config/yarn/global/node_modules/@cerc-io/console-app/dist/production}
|
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
|
||||||
- LACONIC_HOSTED_ENDPOINT=${LACONIC_HOSTED_ENDPOINT:-http://localhost:9473}
|
CERC_WEBAPP_FILES_DIR: ${CERC_WEBAPP_FILES_DIR:-/usr/local/share/.config/yarn/global/node_modules/@cerc-io/console-app/dist/production}
|
||||||
|
LACONIC_HOSTED_ENDPOINT: ${LACONIC_HOSTED_ENDPOINT:-http://localhost:9473}
|
||||||
volumes:
|
volumes:
|
||||||
- ../config/laconic-console/console/config.yml:/config.yml
|
- ../config/laconic-console/console/config.yml:/config/config.yml
|
||||||
ports:
|
ports:
|
||||||
- "80"
|
- "80"
|
||||||
|
|
||||||
|
@ -2,6 +2,9 @@ FROM cerc/webapp-base:local
|
|||||||
|
|
||||||
# Configure the cerc-io npm registry
|
# Configure the cerc-io npm registry
|
||||||
RUN npm config set @cerc-io:registry https://git.vdb.to/api/packages/cerc-io/npm/
|
RUN npm config set @cerc-io:registry https://git.vdb.to/api/packages/cerc-io/npm/
|
||||||
|
RUN npm config set @lirewine:registry https://git.vdb.to/api/packages/cerc-io/npm/
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
@ -9,4 +12,5 @@ RUN echo "Installing dependencies" && yarn
|
|||||||
RUN LACONIC_HOSTED_CONFIG_FILE=config-hosted.yml yarn dist
|
RUN LACONIC_HOSTED_CONFIG_FILE=config-hosted.yml yarn dist
|
||||||
|
|
||||||
RUN npm config set @cerc-io:registry https://git.vdb.to/api/packages/cerc-io/npm/
|
RUN npm config set @cerc-io:registry https://git.vdb.to/api/packages/cerc-io/npm/
|
||||||
|
|
||||||
RUN yarn global add file:$PWD
|
RUN yarn global add file:$PWD
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# Build cerc/laconic-registry-cli
|
|
||||||
|
# Build cerc/laconic2-console-host
|
||||||
|
|
||||||
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh
|
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh
|
||||||
|
|
||||||
# See: https://stackoverflow.com/a/246128/1701505
|
# See: https://stackoverflow.com/a/246128/1701505
|
||||||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||||
|
|
||||||
docker build -t cerc/laconic-console-host:local ${build_command_args} -f ${SCRIPT_DIR}/Dockerfile ${CERC_REPO_BASE_DIR}/laconic-console
|
docker build -t cerc/laconic2-console-host:local ${build_command_args} -f ${SCRIPT_DIR}/Dockerfile ${CERC_REPO_BASE_DIR}/laconic-console
|
||||||
|
@ -35,7 +35,17 @@ Instructions for running laconic registry CLI and console
|
|||||||
* Create a spec file for the deployment:
|
* Create a spec file for the deployment:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/laconic-console deploy init --output laconic-console-spec.yml
|
laconic-so --stack /home/prathamesh/deepstack/testnet-laconicd-stack/stack-orchestrator/stacks/laconic-console deploy init --output laconic-console-spec.yml
|
||||||
|
```
|
||||||
|
|
||||||
|
* Edit `network` in the spec file to map container ports to host ports as required:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
...
|
||||||
|
network:
|
||||||
|
ports:
|
||||||
|
laconic-console:
|
||||||
|
- '8080:80'
|
||||||
```
|
```
|
||||||
|
|
||||||
* Create a deployment from the spec file:
|
* Create a deployment from the spec file:
|
||||||
@ -49,6 +59,18 @@ Instructions for running laconic registry CLI and console
|
|||||||
* Inside the deployment directory, open `config.env` file and set following env variables:
|
* Inside the deployment directory, open `config.env` file and set following env variables:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# TODO
|
# All optional
|
||||||
|
|
||||||
|
CERC_LACONICD_RPC_ENDPOINT=
|
||||||
|
CERC_LACONICD_GQL_ENDPOINT=
|
||||||
|
CERC_CHAIN_ID=
|
||||||
|
CERC_LOGLEVEL=
|
||||||
|
|
||||||
|
LACONIC_HOSTED_ENDPOINT=
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Start the deployment
|
||||||
|
|
||||||
|
```bash
|
||||||
|
laconic-so deployment --dir laconic-console-deployment start
|
||||||
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user