webapp-service-api-stack/README.md

58 lines
1.6 KiB
Markdown
Raw Normal View History

2024-07-25 17:21:36 +00:00
# webapp-service-api-stack
2024-07-25 17:27:18 +00:00
Stack definition for the webapp api service.
## Running this stack locally
(Assumes stack-orchestrator and docker are already installed)
### Fetch the stack repo
```
$ laconic-so fetch-stack git.vdb.to/cerc-io/webapp-service-api-stack --pull
```
### Clone project repositories
```
$ laconic-so --stack ~/cerc/webapp-service-api-stack/stack-orchestrator/stacks/snowballtools-base-backend setup-repositories --git-ssh --pull
```
### Build service container
(Might take 10 minutes)
```
$ laconic-so --stack ~/cerc/webapp-service-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/webapp-service-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/webapp-service-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
```