Skip to content

Instantly share code, notes, and snippets.

deploy:
labels:
- "traefik.port=3000"
- "traefik.docker.network=traefik-st_webgateway"
- "traefik.backend=quercus-api-st"
- "traefik.frontend.rule=Host:domainname.co.uk"
version: "3.1"
networks:
webgateway:
driver: overlay
services:
traefik-st:
image: ourdockerrepo/uswtraefik:latest
command:
- --docker
- --docker.swarmmode
# traefik.toml
################################################################
# Global configuration
################################################################
# Duration to give active requests a chance to finish during hot-reloads.
# Can be provided in a format supported by [time.ParseDuration](https://golang.org/pkg/time/#ParseDuration) or as raw
# values (digits). If no units are provided, the value is parsed assuming
# seconds.
#
FROM traefik:1.3.1
COPY certs/* /etc/certs/
COPY config/traefik.toml /etc/traefik/
## The certificates are all undled into the image as is our edited treafik.toml
server {
listen 80 default;
server_name www.bob.com www.jerry.com www.philip.com;
if $host = "www.philip.com" {
rewrite /name.php }
......
}
FROM ruby:2.3.0
RUN apt-get update -qq && apt-get install -y build-essential nodejs mysql-client vim
RUN mkdir /code
WORKDIR /code
COPY Gemfile Gemfile.lock ./
COPY . ./
@mjdavies
mjdavies / Dockerfile
Created June 23, 2016 13:21
One of the many variants
FROM ruby:2.3.0
RUN apt-get update -qq && apt-get install -y build-essential nodejs mysql-client vim
RUN mkdir /code
WORKDIR /code
ADD Gemfile /code/Gemfile
RUN bundle install
ADD . /code
In a model I've got a method
def library_details
require 'httparty'
@request_url = "longurl"
response = HTTParty.get(@request_url, :timeout => 1)
return response
end
I don't get an error, but the timeout value does not seem to be taken into consideration.
rb(main):001:0> Mailer.shithead().deliver
NoMethodError: undefined method `shithead' for Mailer:Class
from /var/www/rails/courses/shared/bundle/ruby/1.8/gems/actionmailer-3.0.7/lib/action_mailer/deprecated_api.rb:74:in `method_missing'
from /var/www/rails/courses/shared/bundle/ruby/1.8/gems/actionmailer-3.0.7/lib/action_mailer/base.rb:452:in `method_missing'
from (irb):1
@mjdavies
mjdavies / rvm_notes_problem
Created January 31, 2011 15:51
problem with permissions running rvm notes
vm --trace notes
+ [[ -z '' ]]
+ export 'PS4=+[${BASH_SOURCE}] : ${LINENO} :
${FUNCNAME[0]:+${FUNCNAME[0]}() $ }'
+ PS4='+[${BASH_SOURCE}] : ${LINENO} : ${FUNCNAME[0]:+${FUNCNAME[0]}() $ }'
+[/Users/mjdavies/.rvm/scripts/cli] : 596 : __rvm_parse_args() $ [[ -z '' ]]
+[/Users/mjdavies/.rvm/scripts/cli] : 596 : __rvm_parse_args() $ [[ -n '' ]]
+[/Users/mjdavies/.rvm/scripts/cli] : 598 : __rvm_parse_args() $ [[ 0 -eq 1 ]]
+[/Users/mjdavies/.rvm/scripts/cli] : 598 : __rvm_parse_args() $ [[ -n '' ]]
+[/Users/mjdavies/.rvm/scripts/cli] : 14 : __rvm_parse_args() $ [[ -n notes ]]