Skip to content

Latest commit

 

History

History

api

Credbull API layer

Run Locally

yarn dev

Supabase Stop/Start

# start and initialize database
supabase start
# stop
supabase stop
# stop and clear database
supabase stop --no-backup

API

  1. To execute a script, create a User (via App or Script)
  2. Authenticate using Swagger http://localhost:3001/api/docs#/Authentication
  3. Click "Authorize" button and provide the bearer token from step #2

Docker

Build Docker Image

# build the docker file - --platform needs to match the fly.io instances.  currently linux/amd64.
docker build --platform linux/amd64 -f Dockerfile -t credbull-local-api ../..

# list docker images
docker images

Docker Interactive shell, e.g. run ls to see image folder contents

docker run -it credbull-local-api /bin/sh

# exit interactive shell
exit

Run via Docker

# run docker
docker run -d -p 3001:3001 --name credbull-local-container credbull-local-api

## list running docker containers
docker ps

# view docker logs
docker logs credbull-local-container

Teardown

# stop the container
docker stop credbull-local-container

# delete the container
docker rm credbull-local-container

# delete the image
docker rmi credbull-local-api