Skip to content
Posts
Introduction In the previous post I outlined how to set up a Nominatim server that allows us to find a geolocation for any address on the planet. Now let’s use our newfound power in Django. Again, all code snippets are CC0 so make free use of them. But I’d be very happy if you tell me if you use them for something cool!
Prerquisites You have a working geocoding server or use a public one You have a working django app If you want to do geocoding in a different environment you will still be able to use a lot of the the following examples, just skip the Django-specifics and configure the GEOCODING_API_URL according to your needs.
Introduction Geocoding is the process of translating a text input like Ungewitterweg, Berlin into a location with longitude and latitude such as 52.544022/13.147589. So whenever you search in OpenStreetMap or Google Maps for a location, it does exactly that (and sometimes more, but we don’t focus on that now).
For a pet project of mine (notfellchen.org) I wanted to do exactly that: When a animal is added there to be adopted, the user must input a location that is geocoded and saved with it’s coordinates.
This blog post will try to outline the process of deploying ILMO (a Django app) by building a docker image, using ansible to install&configure it on our server and use Traefik as webserver that is readily configured and obtains certificates for us.
I will go through the steps one by one and link more extensive documentation.
Building the docker image Building the docker image is pretty straightforward as it closely resembles the steps of manual deployment.
Hosting Static Sites with Traefik and Static Web Server Traefik is amazing to host complex services like with containers. On the other hand it’s harder than you’d think to host a simple static html site. I wanted to share my current approach that is based on Static Web Server Project.
Static Web Server (SWS) Static Web Server (or SWS abbreviated) is a simple and really fast web server with the goal to serve static web files or assets.