The backend consists of multiple independent services each providing different functionality.
Remove any existing containers and volumes:
docker compose down -vPull our prebuilt image from ghcr.io:
docker compose pullRun the containers:
docker compose up -d- start the container running the database detached from the terminal
docker compose up -d db- if running it for the first time or after recreating the database ...
./scripts/init-db.sh- then:
docker compose up -d
drop database e.g. in case initial data has been updated and needs to reinitialize (see step 2. above)
- remove the database container
docker compose down db -v- then start the database container detached from the terminal
docker compose up db -d- then run the initialization script
./scripts/init-db.shcurl -X GET localhost:3000localhost:3000- access the database container
docker exec -it timescaledb bash- log into database (replace environemnt variables with parameters found in
.envfile)
psql -U ${POSTGRES_DB_USER} -d ${POSTGRES_DB_NAME}Open the documentation/inno2grid_api_documentation.yaml using the Online Swagger Editor.
If you want to run API calls from Swagger you might need to run it locally. Follow the Swagger Docs to set up a localhost using Docker.