From 3126e0aecf235feee22ac9f23006fb5deab30921 Mon Sep 17 00:00:00 2001 From: Jake Low Date: Mon, 28 Oct 2024 12:56:16 -0700 Subject: [PATCH] Mention env variable config overrides in README --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 734d6ffb..ac4ea610 100644 --- a/README.md +++ b/README.md @@ -91,7 +91,7 @@ docker run \ * NOTE: It is helpful to see logs with `docker logs -f maproulette-postgis` * NOTE: To stop the container, that'd be `docker stop maproulette-postgis`. Then you can start it again using `docker start maproulette-postgis`. -#### MapRoulette Database Configuration +#### Configuration Clone the maproulette-backend repository and `cd` to that directory, and create `conf/dev.conf` using the example file: @@ -110,6 +110,13 @@ db.default { } ``` +Alternatively, you can configure the backend using environment variables. The +variables `MR_DATABASE_URL`, `MR_DATABASE_USERNAME` and `MR_DATABASE_PASSWORD` +control the same values as the config parameters shown above. Look in `conf/ +application.conf` for what else can be overridden via environment variables. +Any pattern like `${?FOO}` in that file will be replaced with the value of the +environment variable `FOO` at runtime. + Now start the MapRoulette server! Run this command in a terminal, **not within Intellij/vscode**: `sbt -J-Xms4G -J-Xmx4G -J-Dconfig.file=./conf/dev.conf -J-Dlogger.resource=logback-dev.xml run`