[Unit] Description=PostgreSQL + PostGIS Docker container After=network.target [Service] Type=simple ExecStart=/usr/bin/docker run --rm --name postgres -v /srv/postgres:/var/lib/postgresql postgres ExecStop=/usr/bin/docker stop postgres [Install] WantedBy=multi-user.target