Hi there
I was just keeping track of the new code with the React frontend and did some tests to deploy it with Apache
There were a couple modifications that I had to make to deploy with apache though so I thought that I’d share them!
I’m not very good with ruby so I’m not sure how to make these “configurable”, but at least one of these changes, the last one, was pretty important for making it work!
- Add configurable path for blast outputs
diff --git a/lib/sequenceserver/job.rb b/lib/sequenceserver/job.rb
index a82635a…fde29aa 100644
— a/lib/sequenceserver/job.rb
+++ b/lib/sequenceserver/job.rb
@@ -11,7 +11,7 @@ module SequenceServer
Provides access to global config
and logger
object as instance methods.
Sub-classes must at least define run
instance method.
class Job
- DOTDIR = File.expand_path(’~/.sequenceserver’)
- DOTDIR = File.expand_path(’/custom/path/for/tmpfiles/’)
- Add configurable path for log outputs
diff --git a/lib/sequenceserver.rb b/lib/sequenceserver.rb
index 83e6d9a…9a6c9b7 100644
— a/lib/sequenceserver.rb
+++ b/lib/sequenceserver.rb
@@ -29,7 +29,7 @@ module SequenceServer
end
def logger
- @logger ||= Logger.new(STDERR, verbose?)
-
@logger ||= Logger.new("/custom/path/for/log.txt", verbose?)
end
- This is a weird one, but I had to change the “redirect” code on the backend, and also change the React “router” code. Not sure if this was needed or if there is a workaround, but this was the most important fix to get it working on a subpath
diff --git a/lib/sequenceserver/routes.rb b/lib/sequenceserver/routes.rb
index b531ced…7c84039 100644
— a/lib/sequenceserver/routes.rb
+++ b/lib/sequenceserver/routes.rb
@@ -79,7 +79,7 @@ module SequenceServer
the results when available.
post ‘/’ do
job = Job.create(params)
- redirect “/#{job.id}”
- redirect “/our_new_blast/#{job.id}”
end
diff --git a/public/js/sequenceserver.js b/public/js/sequenceserver.js
index 5186f8d…8ed81d7 100644
— a/public/js/sequenceserver.js
+++ b/public/js/sequenceserver.js
@@ -132,8 +132,8 @@ SequenceServer = React.createClass({
routes: function () {
return (
Thanks!
-Colin