Verified Commit 82c4ad22 authored by Aral Balkan's avatar Aral Balkan
Browse files

Add web logging for production

parent 085e31e2
......@@ -30,6 +30,10 @@ app = require './App'
Builder = require './Builder'
# For piping the logging out
spawn = require('child_process').spawn
class GitlabWebhookServer
instance = null
......@@ -82,7 +86,11 @@ class GitlabWebhookServer
# Default
express.get '/', (request, response) =>
response.redirect 'https://better.fyi'
if App.isRunningInProduction
tail = spawn 'dokku', ['logs', 'builder.better.fyi', '--tail']
tail.stdout.pipe(response)
else
response.redirect 'https://better.fyi'
#
# Web hook
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment