# Docker Environment Variables

| Variable                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | Single Application Mode | Multi Application Mode                 |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------- | -------------------------------------- |
| <p>ENDPOINTS_BASE_URL</p><ul><li>With trailing slash, for example<code>https://endpoints.offer-ready.com/</code></li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | mandatory               | mandatory                              |
| <p>ENDPOINTS_JDBC_URL</p><ul><li>Points to a PostgreSQL database. For example jdbc:postgresql://localhost/endpoints?user=postgres&#x26;password=postgres. At this point in time PostgreSQL 10+ is supported.</li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | mandatory               | mandatory                              |
| <p>ENDPOINTS_PUBLISHED_APPLICATION_DIRECTORY</p><ul><li>Optional. There is usually no need to set this. A directory where published applications are stored. Only set this variable if OpenEndpoints is run outside Docker, where the checked-out applications might survive an application restart.</li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | n/a                     | optional - **do not use with Docker!** |
| <p>ENDPOINTS_SERVICE_PORTAL_ENVIRONMENT_DISPLAY_NAME</p><ul><li>For example "Production Environment", for the login screen of the Service Portal.</li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | n/a                     | mandatory                              |
| <p>ENDPOINTS_SINGLE_APPLICATION_MODE_TIMEZONE_ID</p><ul><li>A string timezone ID such as <code>Europe/Berlin</code>. See the column “TZ database name” in the table at <a href="https://en.wikipedia.org/wiki/List_of_tz_database_time_zones">https://en.wikipedia.org/wiki/List_of_tz_database_time_zones</a> for a full list. The string “UTC” may also be used.</li><li>This is used by the “On-Demand Incrementing Number” feature, which allocates unique values within, for example, a month. Exactly at what point in time the month begins/ends is influenced by this timezone. The environment variable is mandatory if the “On-Demand Incrementing Number” feature is used within the application.</li><li>This variable is only needed if the application is in single-application mode. If the application is in multi-application mode then this information is taken from the <code>application_config</code> database table which is used to store which applications are available in multi-application mode.</li></ul>               | mandatory               | n/a                                    |
| <p>ENDPOINTS_CHECK_HASH</p><ul><li>Default is "true".</li><li>If this is set to "false", no hash checking is done. This is useful when Endpoints is not world-visible, for example part of a multi-image Kubernetes Hub, etc.</li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | optional                | optional                               |
| <p>ENDPOINTS_DISPLAY_EXPECTED_HASH</p><ul><li>For debugging, set this to "true" in order to display the expected value of security hashes.</li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | optional                | optional                               |
| <p>ENDPOINTS_XSLT_DEBUG_LOG</p><ul><li>Default false. For debugging, display the input and output to the parameter transformation XSLT in the logfile, and also bodies produced by XSLT which will be sent to HTTP servers.</li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | optional                | optional                               |
| <p>ENDPOINTS_AWS_CLOUDWATCH_METRICS_INSTANCE</p><p>Optional. If set, CloudWatch metrics are sent, and the Instance dimension of those metrics are this value. For example, if there are multiple Endpoints installations within the same AWS account, setting this environment variable to different values for each of them allows the metrics to be differentiated.</p><p>If this environment variable is not set, not CloudWatch metrics are sent, for example the application is deployed to somewhere other than AWS so no CloudWatch is available.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | optional                | optional                               |
| <p>JAVA_OPTIONS</p><ul><li>Things such as Java heap size. By default, Java takes care of assigning the right amount of memory for the Docker container. Useful values (multiple values separated by a space)</li><li><strong>-verbose:gc</strong> This causes logs to be printed each time a GC occurs, which show the amount of memory used and reclaimed. Useful for determining if the instance needs to be given more memory, or can be given less memory in order to save money.</li><li><strong>-Dwicket.configuration=development</strong> This causes exceptions to be output to the browser, which can be useful for debugging in a situation where there is no access to the Docker logfile. This is not recommended for Prod deployment as this can expose internal information which might be useful to attackers.</li><li><strong>-XX:ActiveProcessorCount=2</strong>, see here: <a href="https://www.databasesandlife.com/java-docker-aws-ecs-multicore/">https://www.databasesandlife.com/java-docker-aws-ecs-multicore/</a></li></ul> | optional                | optional                               |
