# AnzoGraph (Docker Compose service)

This repo runs AnzoGraph as an external container image:

- Image: `cambridgesemantics/anzograph:latest`
- Ports: `8080` (HTTP), `8443` (HTTPS)
- Volume: `./data → /opt/shared-files`

The backend connects to AnzoGraph via:

- `SPARQL_HOST` (default `http://anzograph:8080`) and the `/sparql` path, or
- an explicit `SPARQL_ENDPOINT`

## Persistence

The `docker-compose.yml` config mounts named volumes into the AnzoGraph container so its state survives
container recreation (e.g. `docker compose up --force-recreate`):

- `anzograph_app_home → /opt/anzograph/app-home` (machine-id / user home)
- `anzograph_persistence → /opt/anzograph/persistence` (database persistence dir)
- `anzograph_config → /opt/anzograph/config` (settings + activation markers)
- `anzograph_internal → /opt/anzograph/internal` (internal state, including EULA acceptance marker)

To fully reset AnzoGraph state, remove volumes with `docker compose down -v`.

## Loading data

The backend can optionally load a TTL file on startup (after AnzoGraph is ready):

- `SPARQL_LOAD_ON_START=true`
- `SPARQL_DATA_FILE=file:///opt/shared-files/<file>.ttl`

Because `./data` is mounted at `/opt/shared-files`, anything placed in `./data` is accessible via a `file:///opt/shared-files/...` URI.

## Notes

- Authentication defaults are configured via the backend env (`SPARQL_USER` / `SPARQL_PASS`).
- The AnzoGraph container in this repo is not customized; consult the upstream image documentation for persistence, licensing, and advanced configuration.
