diff --git a/postgres/lib/systemd/system/postgres.service b/postgres/lib/systemd/system/postgres.service new file mode 100644 index 0000000..0234555 --- /dev/null +++ b/postgres/lib/systemd/system/postgres.service @@ -0,0 +1,11 @@ +[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