{"id":27953693,"url":"https://github.com/kbss-cvut/termit-docker","last_synced_at":"2025-05-07T17:14:28.484Z","repository":{"id":40487047,"uuid":"293727344","full_name":"kbss-cvut/termit-docker","owner":"kbss-cvut","description":"Dockerization of TermIt - a SKOS terminology manager","archived":false,"fork":false,"pushed_at":"2025-04-06T09:18:19.000Z","size":219,"stargazers_count":1,"open_issues_count":2,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-05-07T17:14:23.200Z","etag":null,"topics":["docker","docker-compose"],"latest_commit_sha":null,"homepage":"http://kbss-cvut.github.io/termit-web","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kbss-cvut.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2020-09-08T06:57:48.000Z","updated_at":"2025-03-06T14:02:47.000Z","dependencies_parsed_at":"2024-07-15T18:12:39.840Z","dependency_job_id":"c8a58be1-a7b2-4943-b918-18db569d5826","html_url":"https://github.com/kbss-cvut/termit-docker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kbss-cvut%2Ftermit-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kbss-cvut%2Ftermit-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kbss-cvut%2Ftermit-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kbss-cvut%2Ftermit-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kbss-cvut","download_url":"https://codeload.github.com/kbss-cvut/termit-docker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252922323,"owners_count":21825639,"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","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":["docker","docker-compose"],"created_at":"2025-05-07T17:14:27.748Z","updated_at":"2025-05-07T17:14:28.468Z","avatar_url":"https://github.com/kbss-cvut.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TermIt Docker\n\nTermIt Docker serves to spin off a TermIt deployment, consisting of:\n\n- [GraphDB](https://www.ontotext.com/products/graphdb/) (database)\n- [TermIt](https://github.com/kbss-cvut/termit) (backend)\n- [Annotace](https://github.com/kbss-cvut/annotace)\n- [TermIt UI](https://github.com/kbss-cvut/termit-ui) (frontend)\n\n## Prerequisities\n\n- Docker 19.03.0 or later \u0026 Docker Compose installed (and accessible under the current user).\n\n### Resource Requirements\n\n- TermIt: at least 512MB RAM (1GB and more is optimal), at least 2 CPUs\n    - In case more users create and edit terms in TermIt, more CPUs is recommended\n- TermIt UI: 100MB RAM\n- GraphDB: at least 2GB RAM (depending on the amount of data stored), 1 CPU\n- Annotace: at least 512MB RAM\n\nIdeally, the whole deployment should have at least 4GB RAM available, with at least 2-3 CPU cores.\n\n## Running TermIt\n\n1. Set email server configuration in `.env`. In particular, set `MAIL_HOST`, `MAIL_USERNAME` and `MAIL_PASSWORD`, (\n   optionally) `MAIL_PORT`.\n2. (_Optional_) Set `ROOT` variable in `.env` to reflect the local context prefix the app will be running on.\n3. (_Optional_) Set `HOST_PORT` variable in `.env` to reflect the port on which TermIt should be accessible.\n4. (_Optional_) Set `URL` variable in `.env` to reflect the address TermIt will be running on. If the system is running\n   behind a server proxy (like Apache), the URL should be the **public URL** provided by the server proxy (for\n   example, https://termit.fel.cvut.cz). Otherwise,\n   the URL should contain the `HOST_PORT` specified above (for example, http://localhost:1234). If the **public URL**\n   is not based on standards HTTP(S) ports (80, 443), set also the `PUBLIC_PORT` so that the backend is able to\n   correctly generate server URL for the API docs using Swagger UI.\n5. (_Optional_, recommended) Set `JWT_SECRET_KEY` variable in `.env`. It should be a string of at least 32 characters\n   that will be used to hash the JWT authentication token for logged-in users.\n6. Start all the services by running\n   `docker-compose up -d`\n7. (_Optional_) If you have a license for GraphDB, go to `${URL}/${ROOT}/sluzby/db-server/license/register` and upload\n   the license file.\n8. Go to `${URL}/${ROOT}/sluzby/db-server/import#server`, select the \"termit\" repository, and in the \"Server files\"\n   section, click the \"Import\" button for all the files. In the \"Import settings\" dialog, set the Base IRI\n   to `http://onto.fel.cvut.cz/ontologies/termit`.\n9. Go to `${URL}/${ROOT}/sluzby/db-server/sparql` and execute all the queries in the `db-server/lucene` directory to\n   create Lucene connectors for full-text search (see below w.r.t. the connector language settings).\n10. Look for admin credentials in the `termit-server` log (on Linux/WSL, you can use\n    grep: `docker-compose logs | grep \"Admin credentials\"`) and use them for first login at the configured URL,\n    e.g. http://localhost:1234/termit.\n\n## Configuration\n\nTermIt is highly configurable both in terms of the content and the way it runs. This section provides details on\nthe most important configuration options.\n\n### Language\n\nThe default configuration assumes TermIt is run for Czech vocabularies. To use TermIt in other environments, the\nfollowing changes are needed:\n\n#### TermIt\n\nTermIt backend stores and loads strings based on the configured language. To change it, set\nthe `TERMIT_PERSISTENCE_LANGUAGE` value in `docker-compose.yml` to the appropriate language tag (e.g., en, de).\n\n#### Full Text Search\n\nFull text search (FTS) is implemented via Lucene connectors in the underlying GraphDB repository. These connectors are\nlanguage-specific, so to use a different language for TermIt and FTS working correctly, the Lucene connectors need to be\nconfigured accordingly. To use a different language that Czech, set the following in the connector-creating SPARQL\nqueries in `db-server/lucene`:\n\n- Set the value of the \"languages\" attribute to the appropriate language tag\n- Set the value of the \"analyzer\" attribute to the appropriate fully qualified Lucene analyzer class name. See, for\n  example, https://lucene.apache.org/core/4_0_0/analyzers-common/overview-summary.html.\n\n### Further TermIt Configuration\n\nAs stated above, TermIt is highly configurable. The following table lists the names of environment variables that can be\npassed to TermIt backend either directly in `docker-compose.yml`, in\nan [env_file](https://docs.docker.com/compose/compose-file/compose-file-v3/#env_file), or via command line.\n\n| Variable                                           | Explanation                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |\n|:---------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ```TERMIT_ADMIN_CREDENTIALSFILE```\\*               | Name of the file in which admin credentials are saved when its account is generated.\u003cbr\u003evalue must be present                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |\n| ```TERMIT_ADMIN_CREDENTIALSLOCATION```\\*           | Specifies the folder in which admin credentials are saved when its account is generated.\u003cbr\u003evalue must be present                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |\n| ```TERMIT_CHANGETRACKING_CONTEXT_EXTENSION```\\*    | Extension appended to asset identifier (presumably a vocabulary ID) to denote its change tracking context\u003cbr\u003eidentifier.\u003cbr\u003evalue must be present                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |\n| ```TERMIT_COMMENTS_CONTEXT```\\*                    | IRI of the repository context used to store comments (discussion to assets).\u003cbr\u003evalue must be present                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |\n| ```TERMIT_CORS_ALLOWEDORIGINS```\\*                 | A comma-separated list of allowed origins for CORS.\u003cbr\u003eDefault value: ```http://localhost:3000```\u003cbr\u003evalue must be present                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |\n| ```TERMIT_TEMPLATE_EXCELIMPORT```                  | Template file for Excel import.\u003cp\u003e\u003cbr\u003eThe purpose of configuring this file is mainly to have the value lists for term types and states in the\u003cbr\u003etemplate aligned with the corresponding languages used by TermIt.\u003cp\u003e\u003cbr\u003eEmpty value means the built-in template file should be used.                                                                                                                                                                                                                                                                                                                                                                                                      |\n| ```TERMIT_FILE_STORAGE```\\*                        | Specifies root directory in which document files are stored.\u003cbr\u003evalue must be present                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |\n| ```TERMIT_GLOSSARY_FRAGMENT```\\*                   | IRI path to append to vocabulary IRI to get glossary identifier.\u003cbr\u003evalue must be present                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |\n| ```TERMIT_NAMESPACE_FILE_SEPARATOR```\\*            | Separator of File namespace from the parent Document identifier.\u003cp\u003e\u003cbr\u003eSince File identifier is given by the identifier of the Document it belongs to and its own normalized label,\u003cbr\u003ethis separator is used to (optionally) configure the File identifier namespace.\u003cp\u003e\u003cbr\u003eFor example, if we have a Document with IRI ```http://www.example.org/ontologies/resources/metropolitan-plan/document```\u003cbr\u003eand a File with normalized label ```main-file```, the resulting IRI will be ```\u003cbr\u003ehttp://www.example.org/ontologies/resources/metropolitan-plan/document/SEPARATOR/main-file```, where\u003cbr\u003e'SEPARATOR' is the value of this configuration parameter.\u003cbr\u003evalue must be present     |\n| ```TERMIT_NAMESPACE_RESOURCE```\\*                  | Namespace for resource identifiers.\u003cbr\u003evalue must be present                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |\n| ```TERMIT_NAMESPACE_SNAPSHOT_SEPARATOR```\\*        | Separator of snapshot timestamp and original asset identifier.\u003cp\u003e\u003cbr\u003eFor example, if we have a Vocabulary with IRI ```http://www.example.org/ontologies/vocabularies/metropolitan-plan```\u003cbr\u003eand the snapshot separator is configured to ```version```, a snapshot IRI will look something like ```http://www.example.org/ontologies/vocabularies/metropolitan-plan/version/20220530T202317Z```.\u003cbr\u003evalue must be present                                                                                                                                                                                                                                                                  |\n| ```TERMIT_NAMESPACE_TERM_SEPARATOR```\\*            | Separator of Term namespace from the parent Vocabulary identifier.\u003cp\u003e\u003cbr\u003eSince Term identifier is given by the identifier of the Vocabulary it belongs to and its own normalized\u003cbr\u003elabel, this separator is used to (optionally) configure the Term identifier namespace.\u003cp\u003e\u003cbr\u003eFor example, if we have a Vocabulary with IRI ```http://www.example.org/ontologies/vocabularies/metropolitan-plan```\u003cbr\u003eand a Term with normalized label ```inhabited-area```, the resulting IRI will be ```\u003cbr\u003ehttp://www.example.org/ontologies/vocabularies/metropolitan-plan/SEPARATOR/inhabited-area```, where 'SEPARATOR'\u003cbr\u003eis the value of this configuration parameter.\u003cbr\u003evalue must be present |\n| ```TERMIT_NAMESPACE_USER```\\*                      | Namespace for user identifiers.\u003cbr\u003evalue must be present                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |\n| ```TERMIT_NAMESPACE_VOCABULARY```\\*                | Namespace for vocabulary identifiers.\u003cbr\u003evalue must be present                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |\n| ```TERMIT_PERSISTENCE_DRIVER```\\*                  | OntoDriver class for the repository.\u003cbr\u003evalue must be present                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |\n| ```TERMIT_PERSISTENCE_LANGUAGE```\\*                | Language used to store strings in the repository (persistence unit language).\u003cbr\u003evalue must be present                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |\n| ```TERMIT_PUBLICVIEW_WHITELISTPROPERTIES```\\*      | Unmapped properties allowed to appear in the public term access API.\u003cbr\u003evalue must be present                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |\n| ```TERMIT_REPOSITORY_URL```\\*                      | URL of the main application repository.\u003cbr\u003evalue must be present                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |\n| ```TERMIT_TEXTANALYSIS_TERMOCCURRENCEMINSCORE```\\* | Score threshold for a term occurrence for it to be saved into the repository.\u003cbr\u003eDefault value: ```0.49```\u003cbr\u003evalue must be present                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |\n| ```TERMIT_WORKSPACE_ALLVOCABULARIESEDITABLE```\\*   | Whether all vocabularies in the repository are editable.\u003cp\u003e\u003cbr\u003eAllows running TermIt in two modes - one is that all vocabularies represent the current version and can be\u003cbr\u003eedited. The other mode is that working copies of vocabularies are created and the user only selects a subset\u003cbr\u003eof these working copies to edit (the so-called workspace), while all other vocabularies are read-only for\u003cbr\u003ethem.\u003cbr\u003eDefault value: ```true```\u003cbr\u003evalue must be present                                                                                                                                                                                                                      |\n| ```TERMIT_MAIL_SENDER```                           | Human-readable name to use as email sender.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |\n| ```SPRING_MAIL_HOST```                             | Email server hostname.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |\n| ```SPRING_MAIL_PORT```                             | Email server port.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |\n| ```SPRING_MAIL_USERNAME```                         | Email server username.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |\n| ```SPRING_MAIL_PASSWORD```                         | Email server password.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |\n| ```SPRING_SERVLET_MULTIPART_MAXFILESIZE```         | Maximum size of a single uploaded file                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |\n| ```TERMIT_ACL_DEFAULTEDITORACCESSLEVEL```          | Default access level for users in the editor role.\u003cbr\u003eDefault value: ```READ```                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |\n| ```TERMIT_ACL_DEFAULTREADERACCESSLEVEL```          | Default access level for users in the reader role.\u003cbr\u003eDefault value: ```READ```                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |\n| ```TERMIT_CORS_ALLOWEDORIGINPATTERNS```            | A comma-separated list of allowed origin patterns for CORS.\u003cp\u003e\u003cbr\u003eThis allows a more dynamic configuration of allowed origins that ```\\#allowedOrigins``` which contains exact\u003cbr\u003eorigin URLs. It is useful, for example, for Netlify preview builds of the frontend which use a generated\u003cbr\u003esubdomain URL.                                                                                                                                                                                                                                                                                                                                                                               |\n| ```TERMIT_JWT_SECRETKEY```                         | Secret key used when hashing a JWT.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |\n| ```TERMIT_LANGUAGE_STATES_SOURCE```                | Path to a file containing definition of the language of states terms can be in. The file must be in\u003cbr\u003eTurtle format. The term definitions must use SKOS terminology for attributes (prefLabel, scopeNote and\u003cbr\u003ebroader/narrower).                                                                                                                                                                                                                                                                                                                                                                                                                                                        |\n| ```TERMIT_LANGUAGE_TYPES_SOURCE```                 | Path to a file containing definition of the language of types terms can be classified with.\u003cp\u003e\u003cbr\u003eThe file must be in Turtle format. The term definitions must use SKOS terminology for attributes (prefLabel,\u003cbr\u003escopeNote and broader/narrower).                                                                                                                                                                                                                                                                                                                                                                                                                                         |\n| ```TERMIT_MAIL_SENDER```                           | Human-readable name to use as email sender.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |\n| ```TERMIT_REPOSITORY_PASSWORD```                   | Password for connecting to the application repository.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |\n| ```TERMIT_REPOSITORY_PUBLICURL```                  | Public URL of the main application repository.\u003cp\u003e\u003cbr\u003eCan be used to provide read-only no authorization access to the underlying data.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |\n| ```TERMIT_REPOSITORY_USERNAME```                   | Username for connecting to the application repository.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |\n| ```TERMIT_SCHEDULE_CRON_NOTIFICATION_COMMENTS```   | CRON expression configuring when to send notifications of changes in comments to admins and\u003cbr\u003evocabulary authors. Defaults to '-' which disables this functionality.\u003cbr\u003eDefault value: ```-```                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |\n| ```TERMIT_SECURITY_PROVIDER```                     | Determines whether the internal security mechanism or an external OIDC service will be used for\u003cbr\u003eauthentication.\u003cp\u003e\u003cbr\u003eIn case na OIDC service is selected, it should be configured using standard Spring Boot OAuth2 properties.\u003cbr\u003eDefault value: ```INTERNAL```                                                                                                                                                                                                                                                                                                                                                                                                                       |\n| ```TERMIT_SECURITY_ROLECLAIM```                    | Claim in the authentication token provided by the OIDC service containing roles mapped to TermIt user roles.\u003cp\u003e\u003cbr\u003eSupports nested objects via dot notation.\u003cbr\u003eDefault value: ```realm_access.roles```                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |\n| ```TERMIT_TEXTANALYSIS_URL```                      | URL of the text analysis service.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |\n| ```TERMIT_URL```                                   | TermIt frontend URL.\u003cp\u003e\u003cbr\u003eIt is used, for example, for links in emails sent to users.\u003cbr\u003eDefault value: ```http://localhost:3000/#```                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |\n\n**\\* Required**\n\nThe parameters are based on\nthe [Configuration](https://github.com/kbss-cvut/termit/blob/master/src/main/java/cz/cvut/kbss/termit/util/Configuration.java)\nclass in TermIt backend. If you need to further adjust the behavior of TermIt, consult this class.\n\n### Host Proxy Configuration\n\nTermIt uses Web sockets for asynchronous communication between the server and the clients. If the host system runs a web\nproxy (most do),\nthis needs to be configured in the proxy.\n\n#### Apache2\n\nFor the Apache HTTP server (default on Debian and other Linux systems) this can be done by enabling the\n`mod_proxy_wstunnel` [module](https://httpd.apache.org/docs/2.4/mod/mod_proxy_wstunnel.html) and using the following\nrewrite rule:\n\n```apache2\n# Proxy WebSocket connections to termit at port 1234\n  RewriteCond %{HTTP:Upgrade} websocket [NC]\n  RewriteCond %{HTTP:Connection} upgrade [NC]\n  RewriteRule ^/termit?(.*) \"ws://localhost:1234/termit/sluzby/server$1\" [P,L]\n```\n\n#### Nginx\n\nFor nginx, this can be done by adding the following snippet, which initializes the `connection_upgrade` variable, to\nthe `http` section of the `nginx.conf` file:\n\n```nginx\nmap $http_upgrade $connection_upgrade {\n   default upgrade;\n   ''      close;\n}\n```\n\nAnd then adding the `Upgrade` and `Connection` headers to the request:\n\n```nginx\nlocation /termit {\n   proxy_set_header Upgrade $http_upgrade;\n   proxy_set_header Connection $connection_upgrade;\n   # Other proxy headers and proxy_pass\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkbss-cvut%2Ftermit-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkbss-cvut%2Ftermit-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkbss-cvut%2Ftermit-docker/lists"}