Add instructions to deploy sol-token-locker stack

This commit is contained in:
Prathamesh Musale 2025-02-06 11:36:13 +05:30
parent ede5256e9d
commit 5b3f9fc43d
5 changed files with 67 additions and 13 deletions

View File

@ -5,38 +5,96 @@
* Build registry CLI image:
```bash
docker build -t cerc/laconic-registry-cli .
docker build -t cerc/laconic-registry-cli ./sol-mem-gen
# Builds image cerc/laconic-registry-cli:latest
```
* Configure `userKey` and `bondId` in registry CLI [config](./config.yml)
* Configure `userKey` and `bondId` in registry CLI [sol-mem-gen/config](./sol-mem-gen/config.yml)
* Add configuration for registry operations:
```bash
cp .registry.env.example .registry.env
cp sol-mem-gen/.registry.env.example sol-mem-gen/.registry.env
# Fill in the required values
nano .registry.env
nano sol-mem-gen/.registry.env
```
* Add configuration for the app:
```bash
cp ../env.example .app.env
curl -s https://git.vdb.to/deep-stack/sol-mem-gen/raw/branch/main/.env.example -o sol-mem-gen/.app.env
# Fill in the required values
nano .app.env
nano sol-mem-gen/.app.env
```
* Create a dir for `sol-token-locker` deployment:
```bash
mkdir sol-token-locker
```
* Follow [instructions](https://git.vdb.to/deep-stack/sol-token-locker/src/branch/main/stack-orchestrator/stacks/sol-token-locker/README.md) to setup the `sol-token-locker` stack in `./sol-token-locker`
## Run
* Deploy sol-mem-gen App:
### sol-mem-gen
* Update configuration for the app as required:
```bash
nano sol-mem-gen/.app.env
```
* Deploy `sol-mem-gen` App:
```bash
docker run -it \
-v ./:/app/deploy -w /app/deploy \
-v ./sol-mem-gen:/app/deploy -w /app/deploy \
cerc/laconic-registry-cli:latest \
./deploy.sh
```
* Check deployment logs on deployer UI: <https://webapp-deployer-ui.apps.vaasl.io/>
* Visit deployed app: <https://memes.markto.market>
* To redeploy the app (using <https://git.vdb.to/deep-stack/sol-mem-gen> main branch), repeat the previous steps
### sol-token-locker
* Update configuration for token locker as required:
```bash
cd sol-token-locker
nano sol-token-locker-deployment/config.env
```
* [Config reference](https://git.vdb.to/deep-stack/sol-token-locker/src/branch/main/stack-orchestrator/stacks/sol-token-locker/README.md#configuration)
* Start the deployment:
```bash
laconic-so deployment --dir sol-token-locker-deployment start
```
* Follow logs:
```bash
laconic-so deployment --dir sol-token-locker-deployment logs sol-token-locker -f
```
* For updating the deployment:
```bash
# Stop the deployment
laconic-so deployment --dir sol-token-locker-deployment stop
# Update the config as required
nano sol-token-locker-deployment/config.env
# Re-start deployment
laconic-so deployment --dir sol-token-locker-deployment start
```

View File

@ -34,8 +34,6 @@ RUN curl -LO https://git.vdb.to/cerc-io/stack-orchestrator/releases/download/lat
chmod +x ./laconic-so && \
mv ./laconic-so /usr/bin/laconic-so
RUN which laconic-so
# Configure the npm registry
RUN npm config set @cerc-io:registry https://git.vdb.to/api/packages/cerc-io/npm/

View File

@ -17,9 +17,7 @@ LATEST_HASH=$(git ls-remote $REPO_URL HEAD | awk '{print $1}')
echo "Repo: ${REPO_URL}"
echo "Latest hash: ${LATEST_HASH}"
# Hardcoded, increment on each subsequent deployment with code changes
# TODO: Take from package.json
PACKAGE_VERSION=0.0.8
PACKAGE_VERSION=$(curl -s $REPO_URL/raw/branch/main/package.json | jq -r .version)
APP_NAME=sol-mem-gen
# Current date and time for note