{"id":23158728,"url":"https://github.com/greendelta/gdt-server","last_synced_at":"2025-08-18T01:31:01.543Z","repository":{"id":166946381,"uuid":"536518585","full_name":"GreenDelta/gdt-server","owner":"GreenDelta","description":null,"archived":false,"fork":false,"pushed_at":"2025-06-18T13:53:30.000Z","size":137,"stargazers_count":4,"open_issues_count":1,"forks_count":2,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-06-18T14:41:29.602Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GreenDelta.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","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":"2022-09-14T10:05:07.000Z","updated_at":"2025-06-18T13:53:31.000Z","dependencies_parsed_at":"2024-11-15T13:37:13.758Z","dependency_job_id":"e95d3f58-4e12-4c72-9b46-587739f95521","html_url":"https://github.com/GreenDelta/gdt-server","commit_stats":{"total_commits":56,"total_committers":2,"mean_commits":28.0,"dds":0.0357142857142857,"last_synced_commit":"f71c6bc8d2c68c9ace5c06298279d0b404615aea"},"previous_names":["greendelta/gdt-server"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/GreenDelta/gdt-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GreenDelta%2Fgdt-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GreenDelta%2Fgdt-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GreenDelta%2Fgdt-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GreenDelta%2Fgdt-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GreenDelta","download_url":"https://codeload.github.com/GreenDelta/gdt-server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GreenDelta%2Fgdt-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270932556,"owners_count":24670240,"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-08-17T02:00:09.016Z","response_time":129,"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":[],"created_at":"2024-12-17T22:27:18.249Z","updated_at":"2025-08-18T01:31:01.236Z","avatar_url":"https://github.com/GreenDelta.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gdt-server\n\n`gdt-server` is server application that implements Rest-API of the openLCA IPC\nprotocol. See the [openLCA IPC\ndocumentation](https://greendelta.github.io/openLCA-ApiDoc/ipc/) for more\ninformation and examples.\n\n## Running as Docker container\n\nA Docker image of the gdt-server can be composed with [this Docker\nfile](./Dockerfile); e.g. if you have curl and Docker installed:\n\n```bash\ncd \u003cworkdir\u003e\ncurl https://raw.githubusercontent.com/GreenDelta/gdt-server/main/Dockerfile \\\n  \u003e Dockerfile \\\n  \u0026\u0026 docker build -t gdt-server .\n```\nThen you can run a container in the following way:\n\n```bash\ndocker run \\\n  -v $HOME/openLCA-data-1.4:/app/data \\\n  -m 4gb -it --rm \\\n  gdt-server \\\n  -db example --readonly\n```\n\nIn this example, it will mount the default openLCA workspace to the container,\nuse the database `example`, and start the server in readonly mode on port 8080.\n\nOther server parameters can be passed via this start command as described in\nthe openLCA IPC documentation. You can also host static files by mounting a\nfolder to the `/app/static` folder:\n\n```\n  -v \u003cyour host folder\u003e:/app/static\n```\n\n### Memory usage\n\nThe memory limit of the container can be adjusted to your need. The memory necessary for the server depends on the **database size**, the **number of concurrent users**, the **number of threads** and the result disposable **timeout**.\n\nThe maximum percentage of the JVM memory is set to 80%. For the sack of optimization, the default value of the `JAVA_MAX_RAM_PERCENTAGE` environment variable can be set to a higher value. For example, to use 90% of the memory, set the environment variable `-e JAVA_MAX_RAM_PERCENTAGE=90`.\n\n## Building from source\n\nIn order to build the server application, the current version of the openLCA\nMaven modules need to be installed, see\nhttps://github.com/GreenDelta/olca-modules.\n\n```bash\ngit clone https://github.com/GreenDelta/olca-modules.git\ncd olca-modules\nmvn install -DskipTests=true\n```\n\nApplication packages can be then build with the `depl` tool:\n\n```bash\ndart pub get --directory ./depl\ndart depl/main.dart\n```\n\nThis builds the server application in the `build` folder, collects the\njar-dependencies and native libraries, and also creates 3 Docker images:\n\n* `gdt-server-app`: contains the server application\n* `gdt-server-lib`: contains the Java dependencies of the server application\n* `gdt-server-native`: contains the native calculation libraries\n\nThese images can be combined to a server application using [this\nDockerfile](./Dockerfile). Note that in order to run the Docker builds you may need to\n[configure Docker](https://docs.docker.com/engine/install/linux-postinstall/) so\nthat it doesn't need to run as root user.\n\nIt is also possible to build images that contain (read-only) databases with\nLCA models by running the build with a build folder that contains a `data`\nfolder with the following layout:\n\n```\n+ \u003cbuild folder\u003e\n  + data\n    + databases\n      - \u003copenLCA database\u003e\n    + libraries\n      - \u003cpossible data library\u003e\n      - ...\n```\n\nOther build options are:\n\n* commands are `build` (default) or `clean`\n* `-d \u003cbuild folder\u003e`: runs or cleans the build in the given folder\n* `-i \u003cimage suffix\u003e`: appends the suffix to the Docker image in case of a build\n   with packaged database: `gdt-server-\u003cimage suffix\u003e`\n* `-port \u003cport\u003e`: set the server port that should be used in the generated scripts\n* `--no-images`: create Docker files but do not create and delete images\n\nYou can also compile the `depl` tool and run the compiled version:\n\n```bash\ndart compile exe depl/main.dart -o depl/depl\nsudo ./depl/depl docker\n```\n\n## Profile memory usage with Visual VM\n\nVisual VM can be connected to a remote process on a Docker container. The Java process must provide information on one of the container's port (here 9010).\n\n```bash\ndocker run \\\n  -p 8080:8080 -p 9010:9010 \\\n  -v $HOME/openLCA-data-1.4:/app/data \\\n  -m 4gb --rm -it \\\n  --entrypoint /bin/bash \\\n  gdt-server\njava \\\n  -Dcom.sun.management.jmxremote \\\n  -Dcom.sun.management.jmxremote.port=9010 \\\n  -Dcom.sun.management.jmxremote.local.only=false \\\n  -Dcom.sun.management.jmxremote.authenticate=false \\\n  -Dcom.sun.management.jmxremote.ssl=false \\\n  -XX:MaxRAMPercentage=$JAVA_MAX_RAM_PERCENTAGE \\\n  -jar /app/gdt-server.jar \\\n  -data /app/data \\\n  -native /app/native \\\n  -static /app/static \\\n  -db example \\\n  --readonly\n```\n\nVisual VM can connect to this process via *File -\u003e Add JMX connection* on `localhost:9010`.\n\n## License\nThe app layer with the REST API of the gdt-server (e.g. the `gdt-server-app`\nDocker image) and the `depl` tool are licensed under the\n_GNU Affero General Public License Version 3_ (AGPL-v3)\n[see the license text](./LICENSE). The library layer (e.g. the `gdt-server-base`\nDocker image) contains the openLCA core and other third party libraries with\ndifferent licenses, partly _not_ compatible with the AGPL-v3. This means, that\nyou can compose and use a server locally on your computer but distributing the\nserver is not allowed as it violates the conditions of the AGPL-v3. Note that\ndistributing according to the AGPL-v3, also includes usages over a network.\nGreenDelta provides Docker images and gdt-server builds under different license\nconditions than the AGPL-v3. If you need another license,\n[just let us know](https://www.greendelta.com/about-us/contact-us/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgreendelta%2Fgdt-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgreendelta%2Fgdt-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgreendelta%2Fgdt-server/lists"}