-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
793 additions
and
819 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
FROM postgres:11.3 | ||
|
||
RUN apt-get update | ||
RUN apt-get install -y postgresql-11-postgis-3 | ||
FROM postgis/postgis:14-3.3 | ||
|
||
COPY ./compose/production/postgres/maintenance /usr/local/bin/maintenance | ||
RUN chmod +x /usr/local/bin/maintenance/* | ||
RUN mv /usr/local/bin/maintenance/* /usr/local/bin \ | ||
&& rmdir /usr/local/bin/maintenance | ||
|
||
COPY ./compose/production/postgres/initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
# Perform all actions as $POSTGRES_USER | ||
export PGUSER="$POSTGRES_USER" | ||
|
||
# Create the 'template_postgis' template db | ||
"${psql[@]}" <<- 'EOSQL' | ||
CREATE DATABASE template_postgis IS_TEMPLATE true; | ||
EOSQL | ||
|
||
# Load PostGIS into both template_database and $POSTGRES_DB | ||
for DB in template_postgis "$POSTGRES_DB"; do | ||
echo "Loading PostGIS extensions into $DB" | ||
"${psql[@]}" --dbname="$DB" <<-'EOSQL' | ||
CREATE EXTENSION IF NOT EXISTS postgis; | ||
CREATE EXTENSION IF NOT EXISTS postgis_raster; | ||
EOSQL | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* globals activateChoropleth, deactivateChoropleth */ | ||
|
||
const layerSwitches = document.querySelectorAll(".choropleth"); | ||
|
||
layerSwitches.forEach(layerSwitch => { | ||
layerSwitch.addEventListener("change", function() { | ||
if (this.checked) { | ||
layerSwitches.forEach(otherSwitch => { | ||
if (otherSwitch.id !== layerSwitch.id) { | ||
otherSwitch.checked = false; | ||
deactivateChoropleth(null, otherSwitch.id); | ||
map.setLayoutProperty(otherSwitch.dataset.geomLayer, "visibility", "none"); | ||
|
||
} | ||
}); | ||
map.setLayoutProperty(layerSwitch.dataset.geomLayer, "visibility", "visible"); | ||
activateChoropleth(null, layerSwitch.id); | ||
} else { | ||
map.setLayoutProperty(layerSwitch.dataset.geomLayer, "visibility", "none"); | ||
deactivateChoropleth(null, layerSwitch.id); | ||
} | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters