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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
130
Pushing data with Server Sent Events
andrefreitas
1
150
Dapper - A Large-Scale Distributed Systems Tracing Infrastructure
andrefreitas
1
350
How to deal with events backpressure in Elixir
andrefreitas
1
270
Vamos (re)aprender Python
andrefreitas
0
85
Other Decks in Programming
See All in Programming
Claude Team Plan導入・ガイド
tk3fftk
0
250
yield再入門 #phpcon
o0h
PRO
0
930
Apache Hive: そしてCloud Native Lakehouseへ
okumin
1
200
PHP に部分適用が来るぞ!……ところで何それ?おいしいの? #phpcon / phpcon-2026
shogogg
0
550
Terraform標準の組織で AWS CDKをどう使うか
mu7889yoon
1
470
Claude CodeとAgentCore Gatewayを繋ぐ際の認証認可 / Authentication and authorization when connecting Claude Code with AgentCore Gateway
har1101
1
190
JAWS-UG横浜 #102 AWSサ終供養LT会 成仏できない AWS サービスたち 〜本日、三体供養します〜
maroon1st
0
310
Go言語とトイモデルで学ぶTransformerの気持ち / fukuokago23-transformer
monochromegane
0
160
複数の Claude Code が"放置"されてしまう問題をCLI ダッシュボードを自作して解決した話
sumihiro3
1
650
継続モナドとリアクティブプログラミング
yukikurage
3
680
PostgreSQL 18で考えるUUID主キー
kazuhiro1982
0
460
Japan Community Day at Kubecon + CloudNativeCon Japan 2026: Learning Container Privilege Control by Building My Own Low-Level Container Runtime
ternbusty
1
130
Featured
See All Featured
sira's awesome portfolio website redesign presentation
elsirapls
0
320
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
520
Information Architects: The Missing Link in Design Systems
soysaucechin
0
1k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.6k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
560
HDC tutorial
michielstock
2
780
WCS-LA-2024
lcolladotor
0
790
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.5k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
830
Un-Boring Meetings
codingconduct
0
370
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/