Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

githubflavoredmarkdown

  • Loading branch information...
commit f8482205834ac8659958a37ff5d135a89d3e5f8a 1 parent db52d51
Martin Zimmermann authored

Showing 1 changed file with 28 additions and 24 deletions. Show diff stats Hide diff stats

  1. +28 24 doc/DEPLOYMENT.md
52 doc/DEPLOYMENT.md
Source Rendered
@@ -49,24 +49,26 @@ I usually run my services with `start-stop-daemon` (Debian/Ubuntu) so I can mana
49 49 as root but they still run in user space. The following assumes you have your configuration
50 50 file stored in `/path/to/regenwolken/rw.cfg`.
51 51
52   - $ cat /etc/init.d/regenwolken
53   - #!/bin/sh
54   -
55   - NAME=regenwolken
56   - CHDIR=/path/to/regenwolken/
57   - USER=py
58   - DAEMON_OPTS="-H ${CHDIR} --http :8012 -M --env REGENWOLKEN_SETTINGS=${CHDIR}rw.cfg -w regenwolken:Regenwolken()"
59   -
60   - case $1 in
61   - start)
62   - echo -n "Starting $NAME: "
63   - start-stop-daemon --start --pidfile /var/run/$NAME.pid --chdir $CHDIR \
64   - --chuid $USER --make-pidfile --background --exec /usr/local/bin/uwsgi -- $DAEMON_OPTS || true
65   - echo "$NAME."
66   - ;;
67   - stop) kill -9 $(cat /var/run/$NAME.pid)
68   - ;;
69   - esac
  52 +```sh
  53 +#!/bin/sh
  54 +# location: /etc/init.d/regenwolken
  55 +
  56 +NAME=regenwolken
  57 +CHDIR=/path/to/regenwolken/
  58 +USER=py
  59 +DAEMON_OPTS="-H ${CHDIR} --http :8012 -M --env REGENWOLKEN_SETTINGS=${CHDIR}rw.cfg -w regenwolken:Regenwolken()"
  60 +
  61 +case $1 in
  62 + start)
  63 + echo -n "Starting $NAME: "
  64 + start-stop-daemon --start --pidfile /var/run/$NAME.pid --chdir $CHDIR \
  65 + --chuid $USER --make-pidfile --background --exec /usr/local/bin/uwsgi -- $DAEMON_OPTS || true
  66 + echo "$NAME."
  67 + ;;
  68 +stop) kill -9 $(cat /var/run/$NAME.pid)
  69 + ;;
  70 +esac
  71 +```
70 72
71 73 [5]: http://projects.unbit.it/uwsgi/
72 74
@@ -90,15 +92,17 @@ using lighttpd + `mod_proxy`
90 92 Recommended way. Use some proxy-magic and run it as non-privileged user. Edit
91 93 your /etc/lighttpd/lighttpd.conf to something like this:
92 94
93   - $HTTP["host"] =~ "domain.tld|my.cl.ly" {
  95 +```perl
  96 +$HTTP["host"] =~ "domain.tld|my.cl.ly" {
94 97
95   - # some other stuff related to domain.tld
  98 + # some other stuff related to domain.tld
96 99
97   - $HTTP["host"] =~ "domain.tld|my.cl.ly" {
98   - proxy.server = ("" =>
99   - (("host" => "127.0.0.1", "port" => 3000)))
100   - }
  100 + $HTTP["host"] =~ "domain.tld|my.cl.ly" {
  101 + proxy.server = ("" =>
  102 + (("host" => "127.0.0.1", "port" => 3000)))
101 103 }
  104 +}
  105 +```
102 106
103 107 - start mongodb via `invoke-rc.d start mongodb` (if not already running)
104 108 - run `regenwolken` as non-privileged user

0 comments on commit f848220

Please sign in to comment.
Something went wrong with that request. Please try again.