docker changes and user authenticated message

This commit is contained in:
2014-10-09 15:08:37 +02:00
parent c6c26124c8
commit 9e9855f762
12 changed files with 41 additions and 12 deletions
+1
View File
@@ -3,3 +3,4 @@ log
tmp tmp
coverage coverage
public/system public/system
.git
+4 -1
View File
@@ -11,7 +11,7 @@ ADD Gemfile.lock /var/www/
RUN chown -R web:web /var/www &&\ RUN chown -R web:web /var/www &&\
mkdir -p /var/bundle &&\ mkdir -p /var/bundle &&\
chown -R web:web /var/bundle chown -R web:web /var/bundle
RUN su -c "cd /var/www && bundle install --deployment --without development test --path /var/bundle" -s /bin/bash -l web RUN su -c "cd /var/www && bundle install --deployment --without development test assets --path /var/bundle" -s /bin/bash -l web
# Add application source # Add application source
ADD . /var/www ADD . /var/www
@@ -21,4 +21,7 @@ USER web
WORKDIR /var/www WORKDIR /var/www
#VOLUME ['/Users/bterkuile/companytools/development/rails/mozo_bar/public/system:/var/www/public/system']
EXPOSE 3000
CMD ["bundle", "exec", "foreman", "start"] CMD ["bundle", "exec", "foreman", "start"]
+1
View File
@@ -113,6 +113,7 @@ end
# Use unicorn as the app server # Use unicorn as the app server
# gem 'unicorn' # gem 'unicorn'
gem 'foreman'
# Deploy with Capistrano # Deploy with Capistrano
# gem 'capistrano' # gem 'capistrano'
+10 -3
View File
@@ -149,6 +149,9 @@ GEM
debug_inspector (0.0.2) debug_inspector (0.0.2)
diff-lcs (1.2.5) diff-lcs (1.2.5)
docile (1.1.5) docile (1.1.5)
dotenv (0.11.1)
dotenv-deployment (~> 0.0.2)
dotenv-deployment (0.0.2)
em-http-request (1.1.2) em-http-request (1.1.2)
addressable (>= 2.3.4) addressable (>= 2.3.4)
cookiejar cookiejar
@@ -194,11 +197,14 @@ GEM
multi_json (>= 1.0.0) multi_json (>= 1.0.0)
rack (>= 1.0.0) rack (>= 1.0.0)
websocket-driver (>= 0.3.0) websocket-driver (>= 0.3.0)
faye-websocket (0.7.4) faye-websocket (0.7.5)
eventmachine (>= 0.12.0) eventmachine (>= 0.12.0)
websocket-driver (>= 0.3.1) websocket-driver (>= 0.3.5)
font-awesome-rails (4.2.0.0) font-awesome-rails (4.2.0.0)
railties (>= 3.2, < 5.0) railties (>= 3.2, < 5.0)
foreman (0.75.0)
dotenv (~> 0.11.1)
thor (~> 0.19.1)
foundation-rails (5.4.5.0) foundation-rails (5.4.5.0)
railties (>= 3.1.0) railties (>= 3.1.0)
sass (>= 3.2.0) sass (>= 3.2.0)
@@ -409,7 +415,7 @@ GEM
binding_of_caller (= 0.7.3.pre1) binding_of_caller (= 0.7.3.pre1)
railties (~> 4.0) railties (~> 4.0)
sprockets-rails (>= 2.0, < 4.0) sprockets-rails (>= 2.0, < 4.0)
websocket-driver (0.3.4) websocket-driver (0.3.5)
xpath (2.0.0) xpath (2.0.0)
nokogiri (~> 1.3) nokogiri (~> 1.3)
@@ -436,6 +442,7 @@ DEPENDENCIES
factory_girl_rails factory_girl_rails
faye faye
font-awesome-rails font-awesome-rails
foreman
foundation-rails foundation-rails
fuubar fuubar
iso_country_codes iso_country_codes
+3 -3
View File
@@ -1,7 +1,7 @@
#web: bundle exec thin start -p $PORT #web: bundle exec thin start -p $PORT
faye: thin start -R faye/config.ru -p 9296 --pid tmp/pids/faye.pid #faye: thin start -R faye/config.ru -p 9296 --pid tmp/pids/faye.pid
# database: echo "BuenosAires" | sudo -S couchdb start | ~/bin/couch_output # database: echo "BuenosAires" | sudo -S couchdb start | ~/bin/couch_output
# production: faye: thin start -d -R faye/config.ru -p 9296 # production: faye: thin start -d -R faye/config.ru -p 9296
counters: bin/drb_counter.rb run -- development #counters: bin/drb_counter.rb run -- development
# production: conters: bin/drb_counter.rb start # production: conters: bin/drb_counter.rb start
#server: rails s server: bundle exec rails s -e production
+7
View File
@@ -0,0 +1,7 @@
#web: bundle exec thin start -p $PORT
faye: thin start -R faye/config.ru -p 9296 --pid tmp/pids/faye.pid
# database: echo "BuenosAires" | sudo -S couchdb start | ~/bin/couch_output
# production: faye: thin start -d -R faye/config.ru -p 9296
counters: bin/drb_counter.rb run -- development
# production: conters: bin/drb_counter.rb start
#server: rails s
@@ -23,7 +23,9 @@
handleAuthInfo: (user_id, auth_token)-> handleAuthInfo: (user_id, auth_token)->
Qstorage.setItem 'user_id', user_id Qstorage.setItem 'user_id', user_id
Qstorage.setItem 'auth_token', auth_token Qstorage.setItem 'auth_token', auth_token
@__container__.lookup('controller:application').setCurrentList() controller = @__container__.lookup('controller:application')
controller.setCurrentList()
controller.set 'notice', t('messages.authenticated')
App.deferReadiness() App.deferReadiness()
Ember.$.ajaxPrefilter (options) -> Ember.$.ajaxPrefilter (options) ->
if options.type.toUpperCase() == 'GET' if options.type.toUpperCase() == 'GET'
+4
View File
@@ -0,0 +1,4 @@
#!/usr/bin/env ruby
def run(script); `#{script}` end
run "docker build -t bterkuile/mozo-rails ."
+2
View File
@@ -68,6 +68,8 @@ class InMemoryQCounter
end end
end end
end end
rescue RestClient::ResourceNotFound
# view not available, initialize as zero
rescue => e rescue => e
raise e raise e
end end
+4 -4
View File
@@ -1,16 +1,16 @@
development: development:
validation_framework: :active_model #optional validation_framework: :active_model #optional
#database: qwaiter_development #database: "http://mozo:secret@localhost:5984/qwaiter_development"
database: "http://mozo:secret@localhost:5984/qwaiter_development" database: mozo_development
test: test:
validation_framework: :active_model #optional validation_framework: :active_model #optional
#database: "http://mozo:secret@localhost:5984/qwaiter_test" #database: "http://mozo:secret@localhost:5984/qwaiter_test"
#Testing can only be done as couchdb admin, since it requires creating and destroying the database #Testing can only be done as couchdb admin, since it requires creating and destroying the database
database: "qwaiter_test" database: "mozo_test"
# database: "http://admin:secret@localhost:5984/qwaiter_test" # database: "http://admin:secret@localhost:5984/qwaiter_test"
production: production:
validation_framework: :active_model #optional validation_framework: :active_model #optional
database: qwaiter database: qwaiter
user_app: user_app:
validation_framework: :active_model #optional validation_framework: :active_model #optional
database: qwaiter_development database: mozo_development
+1
View File
@@ -20,6 +20,7 @@ en:
unknown_supplier_name: unknown unknown_supplier_name: unknown
unauthorized: Unauthorized action detected unauthorized: Unauthorized action detected
order_could_not_be_processed: 'The order could not be processed' order_could_not_be_processed: 'The order could not be processed'
authenticated: Successfully authenticated
active_list: active_list:
title: Active list title: Active list
+1
View File
@@ -20,6 +20,7 @@ nl:
unknown_supplier_name: onbekend unknown_supplier_name: onbekend
unauthorized: Niet toegestane actie unauthorized: Niet toegestane actie
order_could_not_be_processed: 'De bestelling kan niet worden uitgevoerd' order_could_not_be_processed: 'De bestelling kan niet worden uitgevoerd'
authenticated: Succesvolle login
active_list: active_list:
title: Actieve lijst title: Actieve lijst
needs_payment: Rekening vragen! needs_payment: Rekening vragen!