Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
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
290
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
Reactive Thinking with Signals and the new Resource API
manfredsteyer
PRO
0
130
全員アーキテクトで挑む、 巨大で高密度なドメインの紐解き方
agatan
8
11k
flutter_kaigi_2025.pdf
kyoheig3
2
380
乱雑なコードの整理から学ぶ設計の初歩
masuda220
PRO
32
15k
【レイトレ合宿11】kagayaki_v4
runningoutrate
0
110
TVerのWeb内製化 - 開発スピードと品質を両立させるまでの道のり
techtver
PRO
3
1.3k
モデル駆動設計をやってみよう Modeling Forum2025ワークショップ/Let’s Try Model-Driven Design
haru860
0
200
競馬で学ぶ機械学習の基本と実践 / Machine Learning with Horse Racing
shoheimitani
14
14k
大体よく分かるscala.collection.immutable.HashMap ~ Compressed Hash-Array Mapped Prefix-tree (CHAMP) ~
matsu_chara
1
180
なあ兄弟、 余白の意味を考えてから UI実装してくれ!
ktcryomm
10
9.4k
CSC305 Lecture 17
javiergs
PRO
0
200
[堅牢.py #1] テストを書かない研究者に送る、最初にテストを書く実験コード入門 / Let's start your ML project by writing tests
shunk031
11
6.2k
Featured
See All Featured
How To Stay Up To Date on Web Technology
chriscoyier
791
250k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
285
14k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.5k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
1.8k
How GitHub (no longer) Works
holman
316
140k
Context Engineering - Making Every Token Count
addyosmani
9
440
Practical Orchestrator
shlominoach
190
11k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
36
6.1k
Optimizing for Happiness
mojombo
379
70k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Building Applications with DynamoDB
mza
96
6.8k
We Have a Design System, Now What?
morganepeng
54
7.9k
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/