From 80a6317ac55de020f606a5ca114466d3f0100511 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sat, 13 Apr 2019 12:17:19 +0200 Subject: Use travelynx.conf for configuration and secrets This avoids having to specify secrets in the environment, where they can leak easily. --- examples/travelynx.conf | 23 +++++++++++++++++++++++ examples/travelynx.service | 13 ------------- 2 files changed, 23 insertions(+), 13 deletions(-) create mode 100644 examples/travelynx.conf (limited to 'examples') 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 -- cgit v1.2.3