Restore controlability with environment variables (#1364)
Since PR #922 the contents of `.env` are included in `Makefile` in order for `make` to by aligned with the `docker-compose` settings. ``` # Make all .env variables available for make targets include .env ``` The down-side of employing the `include` mechanism is that the settings in `.env` now take higher precedence than the shell environment variables. As a result, controlling the OpenMapTiles flow because more difficult. For example, tests for `DIFF_MODE=true` had to modify the contents of `.env` in order to work:b0e7f7884c/.github/workflows/integrity.yml (L45-L47)andb0e7f7884c/Makefile (L629-L630)Users were also faced with similar difficulties. This PR restores the ability to control `make` and `quickstart.sh` using environment variable while keeping the use of the `.env` at a lower priority. The result is restoring the ability to easily adjust the OpenMapTiles flow using environment variables, such as: ``` PGPORT=54321 DIFF_MODE=true ./quickstart.sh monaco ``` #### Notes: 1. This PR depends on #1363 2. This PR includes some clean-up of `Makefile`
This commit is contained in:
@@ -54,6 +54,7 @@ services:
|
||||
PGUSER: ${PGUSER:-openmaptiles}
|
||||
PGPASSWORD: ${PGPASSWORD:-openmaptiles}
|
||||
PGPORT: ${PGPORT:-5432}
|
||||
MBTILES_FILE: ${MBTILES_FILE}
|
||||
networks:
|
||||
- postgres
|
||||
volumes:
|
||||
@@ -130,6 +131,8 @@ services:
|
||||
command:
|
||||
- --port
|
||||
- "${TPORT:-8080}"
|
||||
- --mbtiles
|
||||
- "${MBTILES_FILE}"
|
||||
ports:
|
||||
- "${TPORT:-8080}:${TPORT:-8080}"
|
||||
volumes:
|
||||
|
||||
Reference in New Issue
Block a user