snowballtools-base-api-stack/README.md

58 lines
1.6 KiB
Markdown
Raw Permalink Normal View History

2024-06-07 02:07:46 +00:00
# snowballtools-base-api-stack
2024-06-20 20:30:34 +00:00
Stack definition for the snowball api service.
## Running this stack locally
(Assumes stack-orchestrator and docker are already installed)
### Fetch the stack repo
```
2024-06-20 20:39:52 +00:00
$ laconic-so fetch-stack git.vdb.to/cerc-io/snowballtools-base-api-stack --pull
2024-06-20 20:30:34 +00:00
```
### Clone project repositories
```
$ laconic-so --stack ~/cerc/snowballtools-base-api-stack/stack-orchestrator/stacks/snowballtools-base-backend setup-repositories --git-ssh --pull
```
### Build service container
(Might take 10 minutes)
```
$ laconic-so --stack ~/cerc/snowballtools-base-api-stack/stack-orchestrator/stacks/snowballtools-base-backend build-containers
```
### Create a deployment
A deployment is a collection of all the stuff needed to run a single instance of a stack, in this case the snowball api service.
Initialize:
```
$ laconic-so --stack ~/cerc/snowballtools-base-api-stack/stack-orchestrator/stacks/snowballtools-base-backend deploy init --output local-deployment-spec.yml --config SNOWBALL_BACKEND_CONFIG_FILE_PATH=/config/local.toml
```
Then create:
```
$ laconic-so --stack ~/cerc/snowballtools-base-api-stack/stack-orchestrator/stacks/snowballtools-base-backend deploy create --deployment-dir local-deployment --spec-file local-deployment-spec.yml
```
Next create a file at `local-deployment/data/config/local.toml` with this content:
```
<redacted>
```
Finally start the service:
```
$ laconic-so deployment --dir local-deployment start
```
To check logs:
```
$ laconic-so deployment --dir local-deployment logs
```
To stop the service:
```
$ laconic-so deployment --dir local-deployment stop
```