-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
improvements for docker build #5
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
28cfd15
only use REDIS_URL environment variable, easier to use
b1dd846
based on debian for smaller docker image, no ppa needed, patch to loa…
0da50a1
reflect code changes in readme
a0322e9
allow REDIS_URL and env-var trifecta
acf1366
referencing issue that causes the need to patch
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,26 @@ | ||
FROM ubuntu:14.04 | ||
# direct debian works too but is bigger by 40MiB | ||
#FROM debian:jessie | ||
FROM philcryer/min-jessie | ||
|
||
# Prevent docker's default encoding of ASCII. | ||
# # https://oncletom.io/2015/docker-encoding/ | ||
ENV LANG C.UTF-8 | ||
ENV LANGUAGE en_US:C | ||
ENV LC_ALL C.UTF-8 | ||
|
||
# PPA for Ruby 2.1 | ||
RUN apt-get update | ||
RUN apt-get install -y python3-software-properties software-properties-common | ||
RUN add-apt-repository ppa:chris-lea/redis-server | ||
RUN apt-add-repository ppa:brightbox/ruby-ng | ||
RUN apt-get update | ||
RUN apt-get install -y ruby2.1 redis-tools git | ||
RUN echo "deb http://ftp.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/jessie-backports.list && \ | ||
apt-get update && \ | ||
apt-get install -y ruby2.1 git curl && \ | ||
apt-get install -t jessie-backports -y redis-tools && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
RUN gem install bundler | ||
RUN gem2.1 install bundler | ||
|
||
ADD . /qless | ||
WORKDIR /qless | ||
|
||
RUN bundle install | ||
|
||
# make jquery local, can be removed once https://github.com/seomoz/qless/issues/244 is resolved | ||
RUN curl -o "$(find /var/lib/gems/ -wholename */lib/qless/server/static/js -type d)/jquery.min.js" https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js && \ | ||
patch -d "$(find /var/lib/gems/ -wholename */lib/qless/server -type d)" -p4 < /qless/local_js.patch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/lib/qless/server/views/layout.erb b/lib/qless/server/views/layout.erb | ||
index cb41fb6..9ac8747 100644 | ||
--- a/lib/qless/server/views/layout.erb | ||
+++ b/lib/qless/server/views/layout.erb | ||
@@ -12,7 +12,7 @@ | ||
<link href="<%= u '/css/docs.css' %>" rel="stylesheet"> | ||
<link href="<%= u '/css/jquery.noty.css' %>" rel="stylesheet"> | ||
<link href="<%= u '/css/noty_theme_twitter.css' %>" rel="stylesheet"> | ||
- <script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script> | ||
+ <script src="<%= u '/js/jquery.min.js' %>" type="text/javascript"></script> | ||
|
||
<style type="text/css"> | ||
body { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,13 @@ | ||
require 'qless' | ||
require 'qless/server' | ||
|
||
client = Qless::Client.new(:host => ENV['REDIS_HOST'], :port => ENV['REDIS_PORT'].to_i, :db => ENV['DB_NUM'].to_i ) | ||
# use REDIS_URL="redis://some-host:7000/3" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Update the |
||
|
||
if ENV['REDIS_URL'] | ||
client = Qless::Client.new | ||
else | ||
client = Qless::Client.new(:host => ENV['REDIS_HOST'], :port => ENV['REDIS_PORT'].to_i, :db => ENV['DB_NUM'].to_i ) | ||
end | ||
|
||
QlessServer = Rack::Builder.app do | ||
if ENV['QLESS_BASIC_AUTH_USER'] && ENV['QLESS_BASIC_AUTH_PASSWORD'] | ||
|
@@ -10,7 +16,9 @@ QlessServer = Rack::Builder.app do | |
end | ||
end | ||
|
||
map(ENV['HTTP_PATH']) { run Qless::Server.new(client) } | ||
gui_path = ENV.fetch('HTTP_PATH', '/qless') | ||
|
||
map(gui_path) { run Qless::Server.new(client) } | ||
end | ||
|
||
run QlessServer |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that this change should happen in seomoz/qless, not here. Qless, here, can be bumped once seomoz/qless has updated.