Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Rails and Docker in Production at NDrive
Search
André Freitas
September 24, 2016
Programming
170
1
Share
Rails and Docker in Production at NDrive
Our experience in deploying Ruby on Rails webservices with Docker and Ansible in Production.
André Freitas
September 24, 2016
More Decks by André Freitas
See All by André Freitas
Tooling for updating large tables in Postgres
andrefreitas
1
130
Pushing data with Server Sent Events
andrefreitas
1
140
Dapper - A Large-Scale Distributed Systems Tracing Infrastructure
andrefreitas
1
340
How to deal with events backpressure in Elixir
andrefreitas
1
260
Vamos (re)aprender Python
andrefreitas
0
83
Other Decks in Programming
See All in Programming
ソフトウェア設計の結合バランス #phperkaigi
kajitack
0
500
書籍「ユーザーストーリーマッピング」が私のバイブル
asumikam
4
490
t *testing.T は どこからやってくるの?
otakakot
1
930
Symfony AI in Action - SymfonyLive Berlin 2026
chr_hertel
1
140
Kingdom of the Machine
yui_knk
2
1.5k
Lightning-Fast Method Calls with Ruby 4.1 ZJIT / RubyKaigi 2026
k0kubun
3
2.8k
PicoRuby for IoT: Connecting to the Cloud with MQTT
yuuu
2
770
Claude CodeでETLジョブ実行テストを自動化してみた
yoshikikasama
0
1.2k
🦞OpenClaw works with AWS
licux
1
350
要はバランスからの卒業 #yumemi_grow
kajitack
0
120
2026年のソフトウェア開発を考える(2026/05版) / Software Engineering Scrum Fest Niigata 2026 Edition
twada
PRO
22
12k
How We Benchmarked Quarkus: Patterns and anti-patterns
hollycummins
1
190
Featured
See All Featured
Deep Space Network (abreviated)
tonyrice
0
130
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
130
Making the Leap to Tech Lead
cromwellryan
135
9.8k
How GitHub (no longer) Works
holman
316
150k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
390
How STYLIGHT went responsive
nonsquared
100
6.1k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.8k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
360
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
910
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
300
Transcript
Rails and Docker in Production at NDrive André Freitas github.com/andrefreitas
Euruko 2016
We build offline gps navigation apps
We have microservices Made with Ruby on Rails, Golang and
Python
How we build any Rails service? FROM docker.ndrive.com/rails ONBUILD COPY
Gemfile* /code/ ONBUILD RUN bundle install --without="development test" ONBUILD COPY . /code ONBUILD RUN chown 99:99 -R /code ONBUILD USER 99 ONBUILD ARG version ONBUILD LABEL com.ndrive.version=$version DOCKER_TAG=0.1.0 make docker-build docker-push
How we deploy? ansible-playbook site.yml -i production.ini --limit web1.ndrive.com --tags
store environment server or group of servers service
- name: container docker: name: auth state: reloaded restart_policy: always
pull: always net: bridge log_driver: journald image: "docker.ndrive.com/auth:{{ auth.tag }}" ports: - "4001:4001" volumes: - /srv/settings/auth.json:/code/config/settings.json Example of an Ansible Role
Dashboard of Containers (Rancher)
Logs - Rails logs to stdout - Container sends logs
to Journald journalctl CONTAINER_NAME=auth -f
Pros of Docker - Configuration of servers is simple -
We build all in a single artifact (Docker image) - Less surprises in deployments - Easy to spin up a test environment (CI) - Friend of microservices
Cons of Docker - We need to know how to
deal with Docker issues - Low maturity in orchestration (maybe Swarm or Rancher in the future) - Risky for databases
Links - http://docs.ansible.com/ansible/docker_contain er_module.html - http://rancher.com/rancher/