Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
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
ZOZOにおけるAI活用の現在 ~モバイルアプリ開発でのAI活用状況と事例~
zozotech
PRO
9
5.7k
【CA.ai #3】ワークフローから見直すAIエージェント — 必要な場面と“選ばない”判断
satoaoaka
0
250
AIコーディングエージェント(NotebookLM)
kondai24
0
200
FluorTracer / RayTracingCamp11
kugimasa
0
230
Cap'n Webについて
yusukebe
0
130
Tinkerbellから学ぶ、Podで DHCPをリッスンする手法
tomokon
0
130
LLMで複雑な検索条件アセットから脱却する!! 生成的検索インタフェースの設計論
po3rin
3
800
なあ兄弟、 余白の意味を考えてから UI実装してくれ!
ktcryomm
11
11k
俺流レスポンシブコーディング 2025
tak_dcxi
14
8.9k
まだ間に合う!Claude Code元年をふりかえる
nogu66
5
840
堅牢なフロントエンドテスト基盤を構築するために行った取り組み
shogo4131
8
2.4k
LLM Çağında Backend Olmak: 10 Milyon Prompt'u Milisaniyede Sorgulamak
selcukusta
0
120
Featured
See All Featured
The Invisible Side of Design
smashingmag
302
51k
The Language of Interfaces
destraynor
162
25k
Balancing Empowerment & Direction
lara
5
800
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.8k
Designing Experiences People Love
moore
143
24k
Embracing the Ebb and Flow
colly
88
4.9k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Optimizing for Happiness
mojombo
379
70k
A Tale of Four Properties
chriscoyier
162
23k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
51k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
132
19k
Scaling GitHub
holman
464
140k
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/