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
deploy: | |
labels: | |
- "traefik.port=3000" | |
- "traefik.docker.network=traefik-st_webgateway" | |
- "traefik.backend=quercus-api-st" | |
- "traefik.frontend.rule=Host:domainname.co.uk" |
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
version: "3.1" | |
networks: | |
webgateway: | |
driver: overlay | |
services: | |
traefik-st: | |
image: ourdockerrepo/uswtraefik:latest | |
command: | |
- --docker | |
- --docker.swarmmode |
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
# 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. | |
# |
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
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 |
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
server { | |
listen 80 default; | |
server_name www.bob.com www.jerry.com www.philip.com; | |
if $host = "www.philip.com" { | |
rewrite /name.php } | |
...... | |
} |
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
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 . ./ |
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
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 |
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
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. |
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
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 |
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
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 ]] |