Stazegis is a project showing how to build an interactive map application using Django, Postgis, Geoserver and OpenLayers:
- Geolocation API to display current location
- History API to encode map state in URL
- GPX file import via ogr2ogr
- Custom Django user model for email/password login
- Automatic geoserver setup via REST API
- Let's Encrypt SSL certificates with automatic renewal
- Docker and docker-compose for full containerization.
tools/makeconf.sh dev
tools/compose.sh up -d
- (wait 20 seconds for container to start up)
tools/initialize.sh
tools/compose.sh exec app python stazegis/manage.py loaddata articles.json
Copy configuration files from a template directory to the active configuration directory.
# Copy configuration from dev template
tools/makeconf.sh dev
# Copy configuration from prod template
tools/makeconf.sh prod
Wrapper around docker-compose
that defines the configuration files (-f parameter). All arguments are passed
straight through to docker-compose
.
# Bring up all containers
tools/compose.sh up -d
# Stop nginx
tools/compose.sh stop nginx
# Get shell in app container
tools/compose.sh exec app bash
Initialize the app. Perform migrations, collect static files, set up fake SSL certificates.
Requires the app
and db
containers to be up.
Backup database to the postgres_backup
named volume.
Requires the db
container to be up.
Restore database from the postgres_backup
named volume.
Requires the db
container to be up.