If you are new here, read everything and follow the steps the end.
Develop and Test Locally
We have written a script that makes it easy to run this on any local machine (Mac, WSL2). Only deploy the services you need. This script depends on the env values in .env-dev.
$ ./scripts/run.sh <one or more service names that you are testing>
# names of the services - api, channel, language, flow, retriver, indexer
It's important that we test the data contracts (input / output JSONs) for our service. Run the service in one window, send JSON message to Kafka via another and read the messages generated by your service in another.
# create topics (queues) on kafka./scripts/create-topic.shtopic_name# send message to your service./scripts/send-message.shtopic<json># read messages from your service./scripts/read-message.shtopic
Setting up Local DB
# Updating your local database./scripts/upgrade-db.sh# Adding an alembic migration./scripts/create-migration.sh<descriptionofthechanges>
Often there are times when it's better to start from scratch.
# bring down whatever is running
$ docker compose down
# following will delete all your containers - be careful
$ docker volume ls | awk '{print $2}' | xargs docker volume rm
# if you don't want clutter, you can delete all containers
$ docker ps -a | awk '{print $1}' | xargs docker rm