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
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
140
Pushing data with Server Sent Events
andrefreitas
1
160
Dapper - A Large-Scale Distributed Systems Tracing Infrastructure
andrefreitas
1
360
How to deal with events backpressure in Elixir
andrefreitas
1
270
Vamos (re)aprender Python
andrefreitas
0
89
Other Decks in Programming
See All in Programming
Oxlintはいいぞ(続)
yug1224
1
560
PyConJP2026_wat_Python × Signal Processing: How to Draw Pictures with Sound Using Spectrogram Art
wat
0
680
iOS開発×AI駆動開発 〜最近使って便利だったスキルの話〜
nogu66
0
140
信頼性の目標を誰も求めてない
shubox
0
490
MIZARU@SPAJAM2026 第二回予選
1901drama
0
110
20260828_品質と開発生産性を両立させる、AI時代のE2Eテストの考え方
magicpod
0
170
レビュー履歴をAIに食わせて、 Compose移行を加速するs
shihochan
0
270
フロントエンドUIフレームワークのこれまでとこれから
ssssota
1
540
XHTMLが残したもの
yosuke_furukawa
PRO
2
440
go-spidermonkeyでAIエージェントのCode Modeを実装する
syumai
3
1.5k
Gmail/Google DriveをトリガーにAIエージェントを動かそう! / Run AI agents with Gmail/Google Drive as triggers!
har1101
3
470
{ Android | Kotlin } Gradle Plugin in 2026
ryunen344
1
290
Featured
See All Featured
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.5k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
260
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
1k
Become a Pro
speakerdeck
PRO
31
6.2k
RailsConf 2023
tenderlove
30
1.5k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.9k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
320
New Earth Scene 8
popppiees
3
2.5k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
410
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
230
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
1
400
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/