Spring Boot backend for the tarot frontend. The frontend only calls this API; Hugging Face / Gradio secrets stay here.
HF_SPACE_URLHF_TOKEN
PORTAPP_VERSIONCORS_ALLOWED_ORIGINSRATE_LIMIT_REQUESTS_PER_MINUTEHF_API_PREFIXHF_CONNECT_TIMEOUTHF_READ_TIMEOUTHF_GENERATE_READING_API_NAMEHF_BACKEND_VERSION_API_NAMEJAVA_OPTS
- Copy the example env file.
cp .env.example .env-
Fill in the real
HF_TOKENand, if needed, changeHF_SPACE_URL. -
Run Spring Boot with the env file loaded into the shell.
set -a
source .env
set +a
./gradlew bootRuncp .env.example .env
docker compose up --builddocker-compose.yml reads the same .env file and passes the variables into the Spring container.
Provide the same variables through your deployment environment or a production env file that is not committed.
Health check:
curl http://localhost:8080/healthVersion check:
curl http://localhost:8080/api/version