Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Better
Builder
Commits
82c4ad22
Verified
Commit
82c4ad22
authored
Dec 05, 2017
by
Aral Balkan
Browse files
Add web logging for production
parent
085e31e2
Changes
1
Hide whitespace changes
Inline
Side-by-side
GitlabWebhookServer.coffee
View file @
82c4ad22
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment