-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #269 from BaseAdresseNationale/antoineludeau/add-p…
…ostgis-into-postgres-docker-image Added postgis plugin into postgres docker image for local development
- Loading branch information
Showing
3 changed files
with
15 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Use the official PostgreSQL image as the base image | ||
FROM postgres:15 | ||
|
||
# Install PostGIS extension | ||
RUN apt-get update && apt-get install -y postgresql-15-postgis-3 | ||
|
||
# Copy a script to activate PostGIS | ||
COPY docker-resources/postgres/init-postgis.sh /docker-entrypoint-initdb.d |
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,5 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
echo "Activating PostGIS extension..." | ||
psql -U $POSTGRES_USER -d $POSTGRES_DB -c "CREATE EXTENSION postgis;" |