From 678f91b55528a63f856c85d24d8f6fa2f49bfd5e Mon Sep 17 00:00:00 2001 From: Disassembler Date: Sat, 16 Dec 2017 20:40:40 +0100 Subject: [PATCH] Add Postgres Docker service wrapper --- postgres/lib/systemd/system/postgres.service | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 postgres/lib/systemd/system/postgres.service 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