{"id":21615243,"url":"https://github.com/eea/copernicus-insitu-db","last_synced_at":"2025-04-11T07:14:12.943Z","repository":{"id":38418215,"uuid":"91443163","full_name":"eea/copernicus-insitu-db","owner":"eea","description":"Copernicus In Situ Component Information System","archived":false,"fork":false,"pushed_at":"2024-04-04T14:32:31.000Z","size":14123,"stargazers_count":8,"open_issues_count":1,"forks_count":4,"subscribers_count":38,"default_branch":"master","last_synced_at":"2024-04-11T13:00:18.237Z","etag":null,"topics":["copernicus","datatables","django","docker","elasticsearch","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eea.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.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}},"created_at":"2017-05-16T09:56:13.000Z","updated_at":"2024-04-15T16:12:44.693Z","dependencies_parsed_at":"2023-02-09T03:15:53.377Z","dependency_job_id":"80b4ddfb-643e-44a0-911a-98fdeecce875","html_url":"https://github.com/eea/copernicus-insitu-db","commit_stats":{"total_commits":858,"total_committers":21,"mean_commits":"40.857142857142854","dds":"0.37995337995337997","last_synced_commit":"4a14a5294e1350167dadedcd17e7faac06fc43c1"},"previous_names":[],"tags_count":175,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eea%2Fcopernicus-insitu-db","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eea%2Fcopernicus-insitu-db/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eea%2Fcopernicus-insitu-db/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eea%2Fcopernicus-insitu-db/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eea","download_url":"https://codeload.github.com/eea/copernicus-insitu-db/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248358603,"owners_count":21090405,"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":["copernicus","datatables","django","docker","elasticsearch","python"],"created_at":"2024-11-24T22:10:59.115Z","updated_at":"2025-04-11T07:14:12.898Z","avatar_url":"https://github.com/eea.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Copernicus In Situ Component Information System\n\nThe Copernicus In-Situ Coordination (GISC) project aimed at linking in-situ data providers and Copernicus service providers to ensure access to in-situ data for Copernicus services.\n\nThe application provides up-to-date information across the\nCopernicus services on in situ data requirements (current and expected), data used, gaps, data providers, access arrangements, and partnerships.\n\n![Build](https://github.com/eea/copernicus-insitu-db/workflows/CI/badge.svg)\n[![Coverage](https://coveralls.io/repos/github/eea/copernicus-insitu-db/badge.svg?branch=master)](https://coveralls.io/github/eea/copernicus-insitu-db?branch=master)\n[![Docker build](https://img.shields.io/docker/automated/eeacms/copernicus-insitu-db)](https://hub.docker.com/r/eeacms/copernicus-insitu-db)\n[![Docker latest version](https://img.shields.io/docker/v/eeacms/copernicus-insitu-db)]()\n\n## Prerequisites\n\n* Install [Docker](https://docs.docker.com/engine/installation/)\n* Install [Docker Compose](https://docs.docker.com/compose/install/)\n\n### Installing the application\n\n1. Get the source code:\n\n        git clone https://github.com/eea/copernicus-insitu-db.git\n        cd copernicus-insitu-db\n\n1. Start application stack:\n\n        docker-compose up -d\n        docker-compose ps\n\n1. Run migrations, create superuser:\n\n        docker exec -it insitu.app sh\n        python manage.py migrate\n        python manage.py createsuperuser\n\n1. Create read-only db user for explorer using the information from **docker/init_explorer_db.sql**\n\n1. Create SQL views:\n\n        docker cp docker/create_views.sql insitu.db:create_views.sql\n        docker exec -it insitu.db bash\n        psql -U [psql_username] [psql_database] \u003c create_views.sql\n\n1. Create elasticsearch index and start the development server:\n\n        python manage.py search_index -f --rebuild\n        python manage.py runserver 0.0.0.0:8000\n\n1. Run tests:\n\n        docker exec -it insitu.app sh\n        python manage.py test --settings=copernicus.test_settings\n\n1. Check coverage:\n\n        docker exec -it insitu.app sh\n        coverage run --source='.' ./manage.py test --settings=copernicus.test_settings\n        python coverage html\n\n1. See it in action: \u003chttp://localhost:8000\u003e\n\n### Upgrading the application\n\n1. Get the latest version of source code:\n\n        cd copernicus-insitu-db\n        git pull origin master\n\n1. Update the application stack, all services should be \"Up\":\n\n        docker-compose pull\n        docker-compose up -d\n        docker-compose ps\n\n1. See it in action: \u003chttp://localhost:8000\u003e\n\n### Debugging\n\nCustomize docker orchestration for local development:\n\n        cp docker-compose.override.yml.example docker-compose.override.yml\n\n* Please make sure that `DEBUG = True` in the settings.\n\n* Update docker-compose.override.yml file `app` section with the following so that `docker-entrypoint.sh` is not executed:\n\n        entrypoint: [\"/usr/bin/tail\", \"-f\", \"/dev/null\"]\n\n* Attach to docker container and start the server in debug mode:\n\n        docker exec -it insitu.app sh\n        python manage.py runserver 0.0.0.0:8000\n\n* See it in action: \u003chttp://localhost:8000\u003e\n\n## Set User roles\n\n* Read-Only User\n  - create a new regular user and add the user group \"ReadOnly\"\n* ProductEditor\n  - create a new regular user and add the user group \"ProductEditor\"\n* PicklistsEditor\n  - create a new staff user and add the user group \"PicklistsEditor\"\n\n## Ubuntu elasticsearch container error\n\n* If your host runs ubuntu your elasticsearch container may fail to run with the error \"bootstrap checks failed\". This happens because max map count is set under the value __262144__\n* You can fix this temporarily(till you restart your machine) by running:\n\n        sudo sysctl -w vm.max_map_count=262144\n\n* You can fix this permanently by modifying your max_map_count file:\n\n        sudo vim /proc/sys/vm/max_map_count\n        # Change the value from the file with 262144 and save\n\n# Save to fixtures explorer queries\n\n        python manage.py dumpdata explorer.query \u003e explorer.json\n\nTo install\n# Generate Sphinx documentation\n\n        cd docs/\n        make html\n\nAfter the documentation has changed, a new PDF file should be generated and it should replace the current file.\n\n        docker exec -it insitu.app sh\n        apk add texlive-full\n        cd docs/\n        make latexpdf\n        cp _build/latex/CIS2.pdf ../insitu/static/docs/CIS2.pdf\n        \n        \n        \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feea%2Fcopernicus-insitu-db","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feea%2Fcopernicus-insitu-db","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feea%2Fcopernicus-insitu-db/lists"}