summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2019-04-13 12:17:19 +0200
committerDaniel Friesel <derf@finalrewind.org>2019-04-13 12:18:26 +0200
commit80a6317ac55de020f606a5ca114466d3f0100511 (patch)
tree9bd5104c3f07cda2f07f3a783e71e1e5b948f943 /examples
parent61b1ef398e275a110173ed77556ff211adc1ba82 (diff)
Use travelynx.conf for configuration and secrets
This avoids having to specify secrets in the environment, where they can leak easily.
Diffstat (limited to 'examples')
-rw-r--r--examples/travelynx.conf23
-rw-r--r--examples/travelynx.service13
2 files changed, 23 insertions, 13 deletions
diff --git a/examples/travelynx.conf b/examples/travelynx.conf
new file mode 100644
index 0000000..ae61f7b
--- /dev/null
+++ b/examples/travelynx.conf
@@ -0,0 +1,23 @@
+{
+ cache => {
+ schedule => '/var/cache/travelynx/iris',
+ realtime => '/var/cache/travelynx/iris-rt',
+ },
+ db => {
+ host => 'localhost',
+ database => 'travelynx',
+ user => 'travelynx',
+ password => die("Changeme!"),
+ },
+ hypnotoad => {
+ accepts => 100,
+ clients => 10,
+ listen => [ 'http://127.0.0.1:8093' ],
+ pid_file => '/tmp/travelynx.pid',
+ workers => 2,
+ spare => 2,
+ },
+ secrets => [
+ die("Changeme!"),
+ ],
+};
diff --git a/examples/travelynx.service b/examples/travelynx.service
index a946984..0a2b2d5 100644
--- a/examples/travelynx.service
+++ b/examples/travelynx.service
@@ -16,19 +16,6 @@ WorkingDirectory=/srv/www/travelynx
Environment=LANG=en_US.UTF-8
-Environment=TRAVELYNX_DB_NAME=travelynx
-Environment=TRAVELYNX_DB_HOST=localhost
-Environment=TRAVELYNX_DB_PORT=5432
-Environment=TRAVELYNX_DB_USER=travelynx
-Environment=TRAVELYNX_DB_PASSWORD= ! CHANGEME !
-
-Environment=TRAVELYNX_SECRETS= ! CHANGEME !
-
-Environment=TRAVELYNX_WORKERS=2
-Environment=TRAVELYNX_LISTEN=http://127.0.0.1:8093
-
-Environment=TRAVELYNX_IRIS_CACHE=/var/cache/dbf/iris
-Environment=TRAVELYNX_IRISRT_CACHE=/var/cache/dbf/iris-rt
[Install]
WantedBy=multi-user.target