Mercurial > sat_docs
comparison docker/sat_pubsub/Dockerfile @ 83:8dd32aa49614
docker: pid files are put in /tmp to avoid conflict when restarting a container
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 18 Feb 2016 17:19:50 +0100 |
parents | 686a8c982c3f |
children | b69056368901 |
comparison
equal
deleted
inserted
replaced
82:5824dee4ea2b | 83:8dd32aa49614 |
---|---|
24 import os, xmlrpclib\n\ | 24 import os, xmlrpclib\n\ |
25 os.chdir("/usr/share/sat_pubsub")\n\ | 25 os.chdir("/usr/share/sat_pubsub")\n\ |
26 proxy = xmlrpclib.ServerProxy("http://prosody:9999/")\n\ | 26 proxy = xmlrpclib.ServerProxy("http://prosody:9999/")\n\ |
27 domain = proxy.getenv("DOMAIN")\n\ | 27 domain = proxy.getenv("DOMAIN")\n\ |
28 secret = proxy.getenv("SAT_PUBSUB_SECRET")\n\ | 28 secret = proxy.getenv("SAT_PUBSUB_SECRET")\n\ |
29 os.execlp("twistd", "twistd", "-n", "sat_pubsub", "--rhost", "prosody",\ | 29 os.execlp("twistd", "twistd", "-n", "--pidfile", "/tmp/sat_pubsub.pid", "sat_pubsub", "--rhost", "prosody",\ |
30 "--jid", "pubsub.%s" % domain, "--secret", secret)\n\ | 30 "--jid", "pubsub.%s" % domain, "--secret", secret)\n\ |
31 ' > /usr/local/bin/sat_pubsub && chmod 0555 /usr/local/bin/sat_pubsub | 31 ' > /usr/local/bin/sat_pubsub && chmod 0555 /usr/local/bin/sat_pubsub |
32 | 32 |
33 WORKDIR /usr/share | 33 WORKDIR /usr/share |
34 | 34 |