$30 off During Our Annual Pro Sale. View Details »
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
300
How to deal with events backpressure in Elixir
andrefreitas
1
260
Vamos (re)aprender Python
andrefreitas
0
80
Other Decks in Programming
See All in Programming
Developing static sites with Ruby
okuramasafumi
0
310
【Streamlit x Snowflake】データ基盤からアプリ開発・AI活用まで、すべてをSnowflake内で実現
ayumu_yamaguchi
1
120
ViewファーストなRailsアプリ開発のたのしさ
sugiwe
0
510
Github Copilotのチャット履歴ビューワーを作りました~WPF、dotnet10もあるよ~ #clrh111
katsuyuzu
0
120
re:Invent 2025 のイケてるサービスを紹介する
maroon1st
0
140
TUIライブラリつくってみた / i-just-make-TUI-library
kazto
1
400
ゆくKotlin くるRust
exoego
1
110
Graviton と Nitro と私
maroon1st
0
110
Giselleで作るAI QAアシスタント 〜 Pull Requestレビューに継続的QAを
codenote
0
250
AIコーディングエージェント(Gemini)
kondai24
0
250
ハイパーメディア駆動アプリケーションとIslandアーキテクチャ: htmxによるWebアプリケーション開発と動的UIの局所的適用
nowaki28
0
430
Microservices rules: What good looks like
cer
PRO
0
1.6k
Featured
See All Featured
Are puppies a ranking factor?
jonoalderson
0
2.3k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
132
19k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
0
2.2k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
390
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.1k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
120
Thoughts on Productivity
jonyablonski
73
5k
BBQ
matthewcrist
89
9.9k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
11
GitHub's CSS Performance
jonrohan
1032
470k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
29
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/