{"id":31285703,"url":"https://github.com/alekcz/datahike-server","last_synced_at":"2025-10-13T10:35:07.388Z","repository":{"id":304617130,"uuid":"1019310701","full_name":"alekcz/datahike-server","owner":"alekcz","description":"Image for deploying Datahike as a standalone server","archived":false,"fork":false,"pushed_at":"2025-07-14T08:10:34.000Z","size":12,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-05T06:22:50.333Z","etag":null,"topics":["clojure","datahike","datalog","docker"],"latest_commit_sha":null,"homepage":"","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alekcz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-14T06:17:13.000Z","updated_at":"2025-07-14T09:06:28.000Z","dependencies_parsed_at":"2025-07-14T09:53:43.341Z","dependency_job_id":"34300481-f53a-46c8-b26b-4e9e51cb84c4","html_url":"https://github.com/alekcz/datahike-server","commit_stats":null,"previous_names":["alekcz/datahike-server"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/alekcz/datahike-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alekcz%2Fdatahike-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alekcz%2Fdatahike-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alekcz%2Fdatahike-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alekcz%2Fdatahike-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alekcz","download_url":"https://codeload.github.com/alekcz/datahike-server/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alekcz%2Fdatahike-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279014641,"owners_count":26085555,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clojure","datahike","datalog","docker"],"created_at":"2025-09-24T08:13:06.924Z","updated_at":"2025-10-13T10:35:07.369Z","avatar_url":"https://github.com/alekcz.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Datahike Server\n\nA lightweight, container-ready wrapper around [Datahike](https://github.com/replikativ/datahike) that turns the in-process database into a standalone **HTTP server**.\n\nThe project provides:\n\n- 📦 **Pre-built Docker images** published to GHCR.\n- ⚡️ A tiny [`start.edn`](start.edn) Babashka script that bootstraps the server anywhere Java `17+` is available.\n- 🛠️ GitHub Workflow to automatically build and publish new versions.\n\n\u003e If you want to embed Datahike directly inside your own Clojure/JVM project you probably want the core [Datahike](https://github.com/replikativ/datahike) library.  This repository is only about running it as a **service**.\n\n---\n\n## 💡 Quick start\n\n### 1. Run with Docker (recommended)\n\n```bash\n# Pull the latest image\ndocker pull ghcr.io/alekcz/datahike-server:latest\n\n# Start the server on port 4444\n# (change the environment variables to fit your needs)\n\ndocker run \\\n  -p 4444:4444 \\\n  -e DATAHIKE_TOKEN=\"s3cr3t\" \\\n  ghcr.io/alekcz/datahike-server:latest\n```\n\nYou can now send requests to `http://localhost:4444`.\n\n### 2. Run locally with Babashka\n\n```bash\n# Prerequisites: Java 17+  and  Babashka ≥ 1.3\n\n# Clone the repository\n$ git clone https://github.com/alekcz/datahike-server.git\n$ cd datahike-server\n\n# Start the server (defaults to port 4444)\n$ bb start.edn\n```\n\nThe script will:\n\n1. Generate a default configuration file (or read the one you provide via `DATAHIKE_CONFIG_EDN`).\n2. Download any **extra dependencies** you specify.\n3. Launch `datahike.http.server` with the computed classpath.\n\n---\n\n## ⚙️ Configuration\n\nConfiguration is passed to the server as an **EDN file**. You have three options:\n\n1. Let the script generate the file from environment variables (default).\n2. Mount an existing file and point to it via `DATAHIKE_CONFIG_EDN` (inline EDN string).\n3. Build a custom Docker image on top of this one and copy your file into the container.\n\n### Environment variables\n\n| Variable | Default | Description |\n|----------|---------|-------------|\n| `DATAHIKE_PORT` / `PORT` | `4444` | Port the server will bind to |\n| `DATAHIKE_LEVEL` | `info` | Log level (`trace`/`debug`/`info`/`warn`/`error`) |\n| `DATAHIKE_DEV_MODE` | `false` | Enable dev-mode conveniences |\n| `DATAHIKE_TOKEN` | `securerandompassword` | Shared bearer token used for authentication |\n| `DATAHIKE_STORES` | `\"[]\"` | Namespaces of other datahike backends to load at runtime `[\"datahike-jdbc.core\" \"datahike-redis.core\"]` |\n| `DATAHIKE_CONFIG_EDN` | – | Full EDN config string. **Overrides** all other vars if set (doesn't include the extra deps)|\n| `DATAHIKE_EXTRA_DEPS` | – | The extra dependencies for the stores required at runtime |\n\n`DATAHIKE_EXTRA_DEPS` accepts both leinigen style dependencies. \n```clojure\n[[io.replikativ/datahike-jdbc \"0.3.50\"]\n [org.postgresql/postgresql \"42.7.5\"]\n [io.replikativ/datahike-redis \"0.1.7\"]]\n```\nOr deps.edn style dependencies if you prefer. \n\n```clojure\n{io.replikativ/datahike-jdbc {:mvn/version \"0.3.50\"}\n org.postgresql/postgresql   {:mvn/version \"42.7.5\"}\n io.replikativ/datahike-redis {:mvn/version \"0.1.7\"}}\n```\n\n⚠️  When using Docker from the terminal you must pass these variables with `-e`.\n\n---\n\n## 🛠️ Building the image yourself\n\n```bash\n# Clone along with the main Datahike repo (needed for the uber-jar)\n$ git clone https://github.com/alekcz/datahike-server.git \u0026\u0026 cd datahike-server\n$ git clone --depth 1 https://github.com/alekcz/datahike.git\n\n# Build the Datahike HTTP-server uber-jar\n$ cd datahike \u0026\u0026 bb http-server-uber \u0026\u0026 cd ..\n\n# Copy the jar into the build context\n$ mkdir -p build \u0026\u0026 cp datahike/target-http-server/*.jar build/datahike-http-server.jar\n\n# Build the container\n$ docker build -t datahike-server . -f .github/docker/Dockerfile\n```\n\n---\n\n## 🤝 Contributing\n\nPull requests are welcome!  If you spot an issue or have an enhancement in mind, please open an [issue](https://github.com/alekcz/datahike-server/issues) first to discuss.\n\n1. Fork \u0026 clone the repo\n2. Create your branch: `git checkout -b feature/my-amazing-idea`\n3. Commit your changes\n4. Push and open a PR\n\nPlease make sure your code passes `clj-kondo`/`cljfmt`/`zprint` linters (the same ones configured in CI).\n\n---\n\n## 📄 License\n\nThis project is distributed under the terms of the **EPL License** – see [LICENSE](LICENSE) for details. ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falekcz%2Fdatahike-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falekcz%2Fdatahike-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falekcz%2Fdatahike-server/lists"}