Created
September 9, 2022 19:27
-
-
Save Rubix982/d0c0643fe445b0c2fed7b1ffffb6edeb to your computer and use it in GitHub Desktop.
Example of how to use the docker container for postgis by kartoza with docker compose, https://github.com/kartoza/docker-postgis.
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
version: "3.9" | |
services: | |
postgis: | |
image: "kartoza/postgis:14-3.3--v2022.08.30" # postgresql 14.0, postgis 3.3 | |
environment: | |
- "POSTGRES_USER=fotoshi" | |
- "POSTGRES_PASS=chris" | |
- "POSTGRES_DBNAME=gis" | |
- "POSTGRES_INITDB_WALDIR=/opt/postgres/pg_wal" | |
- "POSTGRES_MULTIPLE_EXTENSIONS=postgis" | |
- "ALLOW_IP_RANGE=0.0.0.0/0" | |
- "POSTGRES_TEMPLATE_EXTENSIONS=true" | |
- "DATADIR=/opt/postgres/data" | |
- "DEFAULT_ENCODING=UTF8" | |
- "DEFAULT_COLLATION=id_ID.utf8" | |
- "DEFAULT_CTYPE=id_ID.utf8" | |
- "PASSWORD_AUTHENTICATION=md5" | |
ports: | |
- "5432:5432" | |
volumes: | |
- ./data/pg_data:/var/lib/postgresql | |
- ./data/data_volume:/opt/postgres/data | |
- ./data/pgwal_volume:/opt/postgres/pg_wal | |
restart: "always" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment