Zalgorithm

Running my note taking system's API locally

Instead of dedicating a terminal to running the note’s API Docker containers, start them in the background with:

docker compose up -d

The -d or --detach flag causes containers to be run in the background.

Check the system’s status from the application’s root directory by running:

docker compose ps

View the logs with:

docker compose logs -f

The -f or --follow flag follows log output.

Stop the containers when needed with:

docker compose down

Restart the services (api and chroma) after updating their volumes by adding the following to the local deploy script:

echo "Restarting local Docker services"
docker compose restart chroma
docker compose restart api

Check what’s going on by launching Lazy Docker with the key command SUPER + SHIFT + D. There should be (currently) two containers and two services, not 14 like there were this morning.

Managing images from the command line #

See all images:

docker images

Remove an image:

docker image rm <image_id>

Remove all unused images:

docker image prune -a

See how much space Docker is using:

docker system df
Tags: