diff --git a/run/Caddyfile b/run/Caddyfile new file mode 100644 index 0000000..b02ce49 --- /dev/null +++ b/run/Caddyfile @@ -0,0 +1,7 @@ +ponyapi.apps.xeserv.us { + log syslog + + proxy / http://127.0.0.1:6452 { + proxy_header Host {host} + } +} diff --git a/run/ponyapi.service b/run/ponyapi.service new file mode 100644 index 0000000..505d0b2 --- /dev/null +++ b/run/ponyapi.service @@ -0,0 +1,13 @@ +[Unit] +Description=PonyAPI Server listening on port 6452 +Requires=docker.service +Restart=always + +[Service] +ExecStartPre=-/usr/bin/docker pull xena/ponyapi +ExecStartPre=-/usr/bin/docker rm -f ponyapi +ExecStart=/usr/bin/docker run -p 6452:5000 --name ponyapi xena/ponyapi +ExecStop=/usr/bin/docker rm -f ponyapi + +[Install] +WantedBy=network.target