Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

In this section, we’ll walk you through building and starting an instance of LocatorAPI. There are three options: using Docker, Java, Docker or running Running from source or WAR file.

If you are familiar with docker, this is the preferred method to start else you can try running via Java or from source.

...

You can overwrite the LocatorAPI configuration by placing the .env file in root installation folder of your LocatorAPI. For .env file copy the code below and update its corresponding values as required

Code Block
# please set the following values

# URL and port for the DHIS2 Org Unit API
application.url={{host}}
application.port={{8080}}

# Postgres server details
spring.datasource.url=jdbc:postgresql://<host>:<port>/<database>
spring.datasource.username=<username>
spring.datasource.password=<password>

# jpa Java Persistent API - recommended default values.
spring.jpa.generate-ddl=true 
spring.jpa.hibernate.ddl-auto=create-drop

spring.jpa.show-sql=true
spring.jpa.hibernate.ddl-auto=update
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
spring.jpa.properties.hibernate.format_sql=true

...