Reporting tool towards the Aichi targets and the EU Strategy
6.9K
The project name is Target Cross Linking Tool, a platform for organizing the implementation of a country's national biodiversity strategy after AICHI (and by case after EU Strategy).
It consists of two panels each corresponding an operation: viewing and editing. The first panel allows anyone to overview the aichi goals, targets and indicators along with national strategy mappings (the way a country develops its own strategy in terms of objectives and actions) and its implementation.
The second panel(Admin), authentication-available only, allows an user to actually define the national strategy. (e.g. add/modify/delete an objective, action or even elements from AICHI) in the purpose of building it.
Get the source code:
$ git clone https://github.com/eea/eea.docker.tct
$ cd eea.docker.tct
Customize env files:
$ cp docker/postgres.env.example docker/postgres.env
$ vim docker/postgres.env
$ cp docker/demo.env.example docker/demo.env
$ vim docker/demo.env
$ cp docker/init.sql.example docker/init.sql
$ vim docker/init.sql
Start application stack:
$ docker-compose up -d
$ docker-compose logs
Create a superuser:
$ docker exec -it tct.app sh
$ ./manage.py createsuperuser
Run tests:
$ docker exec -it tct.app sh
# apk add --no-cache libxslt-dev libffi-dev
# pip install -r requirements-dev.txt
$ ./manage.py test
See it in action: http://localhost:8000
Get the latest version of source code:
$ cd eea.docker.tct
$ git pull origin master
Update the application stack, all services should be "Up":
$ 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
By default, it replaces nginx service with a dummy container, builds a local image for app service and maps the project directory inside the app container.
You can add a fixed port number instead the floating one by specifying it under the ports directive (e.g. "8000:80" instead of "80").
Make sure the database user and password from demo.env is matching the ones from init.sql file.
Start stack, all services should be "Up" :
$ docker-compose up -d
$ docker-compose ps
Check application logs:
$ docker-compose logs
When the image is modified you should update the stack:
$ docker-compose down -v #optional step for droping all containers and volumes
$ docker-compose up -d --build
Please make sure that DEBUG=True in demo.env file.
Update docker-compose.override.yml file app section with the following so that docker-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 tct.app sh
# ./manage.py runserver 0.0.0.0:8000
See it in action: http://localhost:8000
Set ALLOWED_USERS in settings to restrict access to a specific set of usernames.
Set AUTH_LDAP_SERVER_URI and AUTH_LDAP_USER_DN_TEMPLATE from settings.py for LDAP Authentication configuration. Add 'django_auth_ldap.backend.LDAPBackend' value in AUTHENTICATION_BACKENDS.
Run over the entire source tree and pull out all strings marked for translation, add/edit/delete translations for each file in tct/locale/[LANGUAGE]/LC_MESSAGE/django.po, compile the po files and restart the server:
$ docker exec -it tct.app sh
# cd tct
# django-admin.py makemessages -a
# django-admin.py compilemessages
$ docker-compose restart demo
Translate the messages using the Rosetta tool for translation (http://localhost:8000/translate) and restart the server when ready:
$ docker-compose restart app
Content type
Image
Digest
Size
108.7 MB
Last updated
over 8 years ago
docker pull eeacms/tct-biodiversity