Public Repository

Last pushed: 2 months ago
Short Description
Demo Python GeoDjango Web App + PostgreSQL + PostGIS in Docker
Full Description

Azure Database for PostgreSQL Demo - Docker

Demo walkthrough + source code: https://github.com/sanagama/geodjango-postgresql-demo

This Docker image is based on mdillon/postgis:9.6-alpine

Contents

  • Alpine 3.5 base OS
  • Python 2.7 and PostgreSQL 9.6
  • PostgreSQL command command-line utilities
  • PostGIS client libraries and Python bindings
  • Demo GeoDjango web app

Run locally

To start the GeoDjango app and PostgreSQL in this container, use:

docker run -it -p 8080:8080 sanagama/geodjango-postgresql-demo

Run interactively

To start an interactive shell session with this container use:

docker run -it -p 8080:8080 --user postgres --entrypoint /bin/bash sanagama/geodjango-postgresql-demo

Use with Azure Database for PostgreSQL

To use with Azure Database for PostgreSQL, pass the server name in the AZ_PGSQL_SERVER environment variable:

docker run -it -p 8080:8080 -e AZ_PGSQL_SERVER=server-name-without-database.windows.net> sanagama/geodjango-postgresql-demo

NOTE: The demo web app expects the server to have a database called demodb and a user called demo. See the detailed walkthrough at: https://github.com/sanagama/geodjango-postgresql-demo

Run in Azure Web App on Linux

To use this Docker image in Azure Web App on Linux, see:
https://docs.microsoft.com/en-us/azure/app-service-web/app-service-linux-using-custom-docker-image

Docker Pull Command
Owner
sanagama

Comments (0)