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
Docker ApplicationをDaaSにデプロイ #dockerjp
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
taichi nakashima
April 11, 2014
Technology
6.7k
11
Share
Docker ApplicationをDaaSにデプロイ #dockerjp
at Docker meetup Tokyo #2
taichi nakashima
April 11, 2014
More Decks by taichi nakashima
See All by taichi nakashima
Platform Engineering at Mercari (Platform Engineering Kaigi 2024)
tcnksm
6
5.3k
Platform Engineering at Mercari
tcnksm
8
5.7k
Embedded SRE at Mercari
tcnksm
0
1.6k
How We Harden Platform Security at Mercari
tcnksm
2
1.9k
SRE Practices in Mercari Microservices
tcnksm
11
14k
開発者向けの基盤をつくる
tcnksm
38
12k
How We Structure Our Work At Mercari Microservices Platform Team
tcnksm
11
23k
Microservices Platform on Kubernetes at Mercari
tcnksm
16
16k
Introduction to Mercari Micorservices Platform Team
tcnksm
5
3.7k
Other Decks in Technology
See All in Technology
マルチモーダル非構造データとの闘い
shibuiwilliam
1
180
解剖"React Native"
hacusk
0
110
Oracle AI Database@AWS:サービス概要のご紹介
oracle4engineer
PRO
4
2.1k
Cortex Code君、今日から内製化支援担当ね。
coco_se
0
280
プロダクトを育てるように生成AIによる開発プロセスを育てよう
kakehashi
PRO
1
790
互換性のある(らしい)DBへの移行など考えるにあたってたいへんざっくり
sejima
PRO
0
560
Tour of Agent Protocols: MCP, A2A, AG-UI, A2UI with ADK
meteatamel
1
210
Databricks Lakebaseを用いたAIエージェント連携
daiki_akimoto_nttd
0
160
あるアーキテクチャ決定と その結果/architecture-decision-and-its-result
hanhan1978
2
480
Oracle AI Database@Azure:サービス概要のご紹介
oracle4engineer
PRO
6
1.4k
建設的な現実逃避のしかた / How to practice constructive escapism
pauli
4
270
GitHub Actions侵害 — 相次ぐ事例を振り返り、次なる脅威に備える
flatt_security
13
7.7k
Featured
See All Featured
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
370
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
110
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
170
GitHub's CSS Performance
jonrohan
1032
470k
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
210
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
We Have a Design System, Now What?
morganepeng
55
8.1k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
260
Optimizing for Happiness
mojombo
378
71k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.4k
Transcript
Deploying Docker Application to DaaS by @deeeet
Taichi Nakashima @deeeet ! • http://deeeet.com/writing (SOTA) • tcnksm/rbdock •
Docker ދͷר, Serf ދͷר
Rails Application Λ Docker ίϯςφʹͷͤͯ Docker as a Service (DaaS)
ʹσϓϩΠ͢Δ
DaaS Docker as a Service Docker ϗεςΟϯάαʔϏε https://orchardup.com/ https://orchardup.com/
DaaS Rails Application Λ Docker ίϯςφʹͷͤͯ Docker as a Service
(DaaS) ʹσϓϩΠ͢Δ https://orchardup.com/ DaaS https://orchardup.com/ https://orchardup.com/
DaaS Rails Application Λ Docker ίϯςφʹͷͤͯ Docker as a Service
(DaaS) ʹσϓϩΠ͢Δ https://orchardup.com/ DaaS https://stackdock.com/
DaaS Rails Application Λ Docker ίϯςφʹͷͤͯ Docker as a Service
(DaaS) ʹσϓϩΠ͢Δ https://orchardup.com/ DaaS http://www.tutum.co/
Orchard • ؆୯ͳίϚϯυϥΠϯϥούʔΛ௨ͯ͡ ϩʔΧϧ͔Βಉ͡ίϚϯυୟ͚ͩ͘Ͱ͑Δ • 1࣌ؒ1ԁ/1݄1000ԁఔͰ͑Δ (512MB RAM/20GB SSD) •
Fig (ίϯςφؒͷ࿈ܞΛࢧԉ͢Δπʔϧ)ͷ ։ൃΛ͍ͯ͠Δ
Environment • OSX • boot2docker • mkwiatkowski/todo-rails4-angularjs (Rails) worked with
ruby2.0.0p-247, postgresql (DB)
Overview Postgresql Container Rails Container :3000 5432:5432
Dockerfile (Rails) $ gem install rbdock $ rbdock 2.0.0-p247 --app
todo-rails4-angularjs https://github.com/tcnksm/rbdock
development: adapter: postgresql template: template0 encoding: unicode database: todo_rails4_angularjs_development pool:
5 username: docker password: docker host: <%= ENV.fetch('DB_PORT_5432_TCP_ADDR') %> port: <%= ENV.fetch('DB_PORT_5432_TCP_PORT') %> http://deeeet.com/writing/2014/03/20/docker-link-container/ config/database.yml
Development at local
$ docker run -d -p 5432:5432 \ -e POSTGRESQL_USER=docker \
-e POSTGRESQL_PASS=docker \ -name pg \ orchardup/postgresql Postgresql Container
$ docker run -d -p 5432:5432 \ -e POSTGRESQL_USER=docker \
-e POSTGRESQL_PASS=docker \ -name pg \ orchardup/postgresql Rails Container $ docker run -i t —p 3000:3000 \ -link pg:db \ tcnksm/rails \ 'rake db:create && rake db:migrate && rails server'
http://localhost:3000
Development at local • มߋ͕ೖͬͨΒ build && run (+Guard) •
VolumesػೳΛ͑ϦΞϧλΠϜߋ৽ (+ ONBUILD)
Docker Share (ngrok) $ orchard hosts create Orchard username: tcnksm
Password: Default host running at 162.243.106.93 $ ngrok 3000 http://36a98c94.ngrok.com -> 127.0.0.1:3000
http://36a98c94.ngrok.com
Deploy to Orchard
Login to Orchard $ orchard hosts create Orchard username: tcnksm
Password: Default host running at 162.243.106.93
$ orchard docker run -d -p 5432:5432 \ -e POSTGRESQL_USER=docker
\ -e POSTGRESQL_PASS=docker \ -name pg \ orchardup/postgresql Postgresql Container
$ docker run -d -p 5432:5432 \ -e POSTGRESQL_USER=docker \
-e POSTGRESQL_PASS=docker \ -name pg \ orchardup/postgresql Rails Container $ orchard docker run -i t —p 80:3000 \ -link pg:db \ tcnksm/rails \ 'rake db:create && rake db:migrate && rails server'
http://162.243.106.93
Conclusion • DaaSʹRails ApplicationΛDeploy • Orchard ͱͯγϯϓϧ -> ϩʔΧϧ͔Βಉ͡ίϚϯυΛୟ͚ͩ͘
Future • HerokuʹpushͱൺͯԿ͕ྑ͍ͷ? -> DockerͰΔརͷٻʢ͖উखͰ͖Δ+αʣ • ίϯςφ্ཱͪ͛ͨޙ? -> ࣮ࡍͷӡ༻
Thanks