Skip to main content

Docker

Configuring the .env File

The .env file is a crucial component for deploying OpenCDMP using Docker Compose. It contains environment variables that specify:

  • Versions of the container images.
  • Docker registry to be used.
  • Exposed ports for the proxy, API, and PostgreSQL services.

This file is located in the same directory as the docker-compose.yml files.

Env VariableDescriptionDefault ValueExample
PROXY_TAGNginx proxy version.-<version>
MAIN_APP_TAGOpenCDMP's backend/frontend version.-<version>
NOTIFICATION_APP_TAGOpenCDMP's notification service version.-<version>
ANNOTATION_APP_TAGOpenCDMP's annotation service version.-<version>
DOCX_APP_TAGOpenCDMP's docx file transformer version.-<version>
JSON_APP_TAGOpenCDMP's json file transformer version.-<version>
EVALUATOR_APP_TAGOpenCDMP's evaluator service version.-<version>
ZENODO_APP_TAGOpenCDMP's zenodo plugin service version.-<version>
POSTGRES_TAGPostgresql database version.-<version>
ELK_TAGElasticsearch database version.-<version>
KEYCLOAK_TAGKeycloak authentication service version.-<version>
RABBITMQ_TAGRabbitMQ message-broker service version.-<version>
PDF_SERVICE_TAGGotenberg pdf file transformer version.-<version>
PROFILEOpenCDMP profile. (Changing this requires you to also change the "test" prefix in your opencdmp configuration files.)testproduction
WEBAPP_BASE_URLFrontend base path. (commented by default)//<base_path>
WEBAPP_API_URLBackend base URL.-http://<host>:<port>/
INSTALLATION_URLFrontend base URL.-http://<host>:<port>/<api_path>
DEFAULT_CULTUREDefault language to be used.en<default_culture>
KEYCLOAK_ADDRESSKeycloak base URL.-http://<host>:<port>/<keycloak_path>
KEYCLOAK_REALMKeycloak realm used.-<realm_name>
KEYCLOAK_CLIENT_IDFrontend client used.-<webapp_client_name>
KEYCLOAK_SCOPEFrontend required client scopes.-<scope1> <scope2> ... <scope X>
LOGGING_ENABLEDEnable/Disable logging.truetrue
SERVER_PORTInternal container ports for the OpenCDMP services.8080<port>
PROXY_APP_PORTExternal container port for the Nginx proxy service.8081<port>
POSTGRES_PORTExternal container port for the Postgresql database service.5432<port>
CONFIG_FILES_PATHBind mount base path for all service configuration../config-files<path>
LOG_FILES_PATHBind mount base path for all service logging../logs<path>
STORAGE_PATHBind mount base path for all service storage../storage<path>
ELASTIC_PASSWORDElasticsearch default password for the opencdmp.elasticsearch.setup container.elastic<your_password>

Configuring the .env file correctly is essential for the successful deployment of OpenCDMP. Adjust the variables according to your deployment environment and ensure consistency across all services.