Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Rails and Docker in Production at NDrive
Search
André Freitas
September 24, 2016
Programming
180
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
170
Dapper - A Large-Scale Distributed Systems Tracing Infrastructure
andrefreitas
1
370
How to deal with events backpressure in Elixir
andrefreitas
1
270
Vamos (re)aprender Python
andrefreitas
0
96
Other Decks in Programming
See All in Programming
AI駆動開発4年目の現在地(『あなたはFDEになるべきか?』イベント資料)
kumaiu
0
150
AIが実装を担う時代の「技術設計」と「チームマネジメント」
kamina_zzz
2
210
PyConTW 2026 - AI Coding 不只是工具升級, 區域醫院醫療資訊系統協作開發與資訊團隊轉型實踐
cclai999
0
240
AI時代のFlutter品質設計 — アプリ品質を守るQuality Layers
omatty198
0
360
ChromeでローカルLLM
ryu1013
0
200
Python Lambdaにおけるテストしやすい設計とAI支援の活用 / Designing Testable Python Lambda Functions with AI
kitano_yuichi
1
300
AWS CDKを理解するために公式の定義を深掘って解説してみる / Understanding AWS CDK by Digging into Its Official Definition
akihisaikeda
3
280
AIがコードを書いてくれる時代、我々は何を確かめるのか
yosuke_furukawa
PRO
13
5.7k
オーケストレーション記述言語 Katari
yukikurage
0
240
baseline으로 마이그레이션, 리팩토링 안전하게 맡기기
fornewid
1
920
作れるエンジニアから、価値を届けるエンジニアへ
ryunakayama
1
230
作って学ぶSpring BootのAuto Configuration / JJUG Night Seminar 2026-10-19
rshindo
0
220
Featured
See All Featured
Ten Tips & Tricks for a 🌱 transition
stuffmc
1
280
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
670
For a Future-Friendly Web
brad_frost
184
11k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.5k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.2k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
650
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
4
4.4k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
570
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.6k
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
We Have a Design System, Now What?
morganepeng
55
8.4k
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/