Old tiles.ttss.pl backed using MapProxy
Jacek Kowalski
2020-06-09 a32ed5ec142a74385fe24f9e1adecfc86847f543
commit | author | age
d1e1f5 1 #!/bin/bash
JK 2
3 . common.sh
4
5 cat > /etc/systemd/system/tiles-postgis.service <<EOF
6 [Unit]
7 Description=Docker container tiles-postgis
8 After=docker.service
9 Requires=docker.service
10
11 [Service]
12 ExecStart=/usr/bin/docker start -a "${DOCKER_PREFIX}-postgis"
13 ExecStop=/usr/bin/docker stop -t 20 "${DOCKER_PREFIX}-postgis"
14 TimeoutStopSec=30s
15 Restart=on-failure
16
17 [Install]
18 WantedBy=multi-user.target
19 EOF
20
21 cat > /etc/systemd/system/tiles-mapproxy.service <<EOF
22 [Unit]
23 Description=Docker container tiles-mapproxy
24 After=docker.service tiles-postgis.service
25 BindsTo=docker.service tiles-postgis.service
26
27 [Service]
28 ExecStart=/usr/bin/docker start -a "${DOCKER_PREFIX}-mapproxy"
29 ExecStop=/usr/bin/docker stop -t 20 "${DOCKER_PREFIX}-mapproxy"
30 TimeoutStopSec=30s
31 Restart=on-failure
32
33 [Install]
34 WantedBy=multi-user.target
35 EOF
36
37 systemctl daemon-reload
38 systemctl enable tiles-mapproxy