The 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.
The application provides up-to-date information across the Copernicus services on in situ data requirements (current and expected), data used, gaps, data providers, access arrangements, and partnerships.
- Install Docker
- Install Docker Compose
-
Get the source code:
git clone https://github.com/eea/copernicus-insitu-db.git cd copernicus-insitu-db
-
Customize env files and
docker-compose.yml
:cp docker/app.env.example docker/app.env vim docker/app.env cp docker/db.env.example docker/db.env vim docker/db.env
-
Start application stack:
docker-compose up -d docker-compose logs
-
Run migrations, create superuser, create elasticsearch index and start the development server:
docker exec -it insitu.app sh python manage.py migrate python manage.py createsuperuser python manage.py search_index -f --rebuild python manage.py runserver 0.0.0.0:8000
-
Run tests:
docker exec -it insitu.app sh python manage.py test --settings=copernicus.testsettings
-
Check coverage:
docker exec -it insitu.app sh coverage run --source='.' ./manage.py test --settings=copernicus.testsettings python coverage html
-
See it in action: http://localhost:8000
-
Get the latest version of source code:
cd copernicus-insitu-db git pull origin master
-
Update the application stack, all services should be "Up":
docker-compose pull docker-compose up -d docker-compose ps
-
See it in action: http://localhost:8000
Customize docker orchestration for local development:
cp docker-compose.override.yml.example docker-compose.override.yml
-
Please make sure that
DEBUG=True
inapp.env
file. -
Update docker-compose.override.yml file
app
section with the following so thatdocker-entrypoint.sh
is not executed:entrypoint: ["/usr/bin/tail", "-f", "/dev/null"]
-
Attach to docker container and start the server in debug mode:
docker exec -it insitu.app sh python manage.py runserver 0.0.0.0:8000
-
See it in action: http://localhost:8000
-
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
-
You can fix this temporarily(till you restart your machine) by running:
sudo sysctl -w vm.max_map_count=262144
-
You can fix this permanently by modifying your max_map_count file:
sudo vim /proc/sys/vm/max_map_count # Change the value from the file with 262144 and save
cd docs/
make html