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
1
160
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
Tweet
Share
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
330
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
Windows on Ryzen and I
seosoft
0
270
エンジニアの「手元の自動化」を加速するn8n 2026.02.27
symy2co
0
150
社内規程RAGの精度を73.3% → 100%に改善した話
oharu121
13
8k
New in Go 1.26 Implementing go fix in product development
sunecosuri
0
430
モックわからないマン卒業記 ~振る舞いを起点に見直した、フロントエンドテストにおけるモックの使いどころ~
tasukuwatanabe
2
230
nuget-server - あなたが必要だったNuGetサーバー
kekyo
PRO
0
240
Swift ConcurrencyでよりSwiftyに
yuukiw00w
0
260
エージェント開発初心者の僕がエージェントを作った話と今後やりたいこと
thasu0123
0
240
Docコメントで始める簡単ガードレール
keisukeikeda
1
110
AI駆動開発の本音 〜Claude Code並列開発で見えたエンジニアの新しい役割〜
hisuzuya
4
500
Go 1.26でのsliceのメモリアロケーション最適化 / Go 1.26 リリースパーティ #go126party
mazrean
1
390
maplibre-gl-layers - 地図に移動体たくさん表示したい
kekyo
PRO
0
260
Featured
See All Featured
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
240
The Cost Of JavaScript in 2023
addyosmani
55
9.8k
Paper Plane
katiecoart
PRO
0
48k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.1k
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Utilizing Notion as your number one productivity tool
mfonobong
4
260
Are puppies a ranking factor?
jonoalderson
1
3.1k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
120
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
210
The Invisible Side of Design
smashingmag
302
51k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
190
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
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/