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
個人開発のやっていき方
Search
r7kamura
July 20, 2017
Programming
94
23k
個人開発のやっていき方
2017年7月20日に行われた Rails Developers Meetup #3 の発表資料です。
r7kamura
July 20, 2017
Tweet
Share
More Decks by r7kamura
See All by r7kamura
Railsアップグレード百景
r7kamura
11
6.5k
amakanにおける書籍のシリーズ判定方法について 2016-08-21
r7kamura
10
6k
Tenkaichi Bot Butoukai
r7kamura
11
5.1k
Paging in API
r7kamura
3
8.6k
Chanko Hacking Guide
r7kamura
5
1.2k
Making things with something small
r7kamura
1
460
Hidden
r7kamura
0
73
Butsukari Geiko
r7kamura
10
36k
Casual CI Server
r7kamura
7
1.8k
Other Decks in Programming
See All in Programming
Security_for_introducing_eBPF
kentatada
0
110
フロントエンドのディレクトリ構成どうしてる? Feature-Sliced Design 導入体験談
osakatechlab
8
4.1k
Zoneless Testing
rainerhahnekamp
0
120
これでLambdaが不要に?!Step FunctionsのJSONata対応について
iwatatomoya
2
3.6k
Refactor your code - refactor yourself
xosofox
1
260
SymfonyCon Vienna 2025: Twig, still relevant in 2025?
fabpot
3
1.2k
コンテナをたくさん詰め込んだシステムとランタイムの変化
makihiro
1
120
Effective Signals in Angular 19+: Rules and Helpers @ngbe2024
manfredsteyer
PRO
0
130
数十万行のプロジェクトを Scala 2から3に完全移行した
xuwei_k
0
260
RWC 2024 DICOM & ISO/IEC 2022
m_seki
0
200
命名をリントする
chiroruxx
1
380
生成AIでGitHubソースコード取得して仕様書を作成
shukob
0
150
Featured
See All Featured
Designing for Performance
lara
604
68k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
247
1.3M
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
Optimising Largest Contentful Paint
csswizardry
33
3k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5.1k
Designing for humans not robots
tammielis
250
25k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.9k
Practical Orchestrator
shlominoach
186
10k
A designer walks into a library…
pauljervisheath
204
24k
Transcript
ݸਓ։ൃͷ͍͖͔ͬͯͨ @r7kamura
ࣗݾհ • Ryo Nakamura • https://github.com/r7kamura • https://twitter.com/r7kamura • Cookpad→Increments→ϑϦʔϥϯε
• Railsͷࣄͱ͔୳ͯ͠·͢
ࠓ͢͜ͱ • Կͭͬͨ͘Β͍͍ͷ͔ • ਓखෆ • ۀͱͷؔΘΓํ • OSSʹ͢Δ͔Ͳ͏͔ •
๏ͱܦཧ • ࣦഊࣄྫ • ΤλΒͳ͍ͨΊʹ
Կͭͬͨ͘Β͍͍ͷ͔
Կͭͬͨ͘Β͍͍ͷ͔ (1/2) • Hello, world!! ͷ͜͏ଆʹਐΊͳ͍ • Կ͔ͭ͘Δͧͱߟ͑ͨͱ͖ʹ·ͣ͜ΕͰࠔΔ • ղ͖͘ΛઃఆͰ͖ͳ͍ͱ͍͏
• దͳΛݟ͚ͭΔͷ͕Ұ൪͍͠…
Կͭͬͨ͘Β͍͍ͷ͔ (2/2) • →ࠜݯతͳཉٻʹࣖΛ͚Δͱྑ͍ • ࣗͷΛղܾͰ͖Δͷ͕ྑ͍ • খ࢝͘͞ΊΒΕΔͱྑ͍ • ͘ଓ͚ΒΕΔͱྑ͍
• ์ஔͰ͖Δͷ͕ྑ͍ • ऩೖΛಘΒΕΔͱͳ͓ྑ͍
amakan.net ͷ߹ • ແݶʹອըಡΈ͍ͨ… • →ອըͷແݶϦετ͕ཉ͍͠… • →͕ࣗ͡ΌͿ͡ΌͿߪೖͨ͘͠ͳΔΑ͏ͳɺࣹ৺Λ ἤΓ·͘Δ৽ץϦετ͕… •
→AmazonͷAPIͰΰχϣΰχϣΕ͍͚ͦ͏ • →ऩೖͰແݶʹອըಡΊΔͣ
https://amakan.net/ ಡॻཤྺ৽ץใΛཧ͢ΔαʔϏε
None
None
None
ͱ͍͑ • ͭ͘Γ͍ͨͷ͕ͭ͘ΕΔͱݶΒͳ͍ • ೳྗෆͰ࣮ݱͰ͖ͦ͏ʹͳ͍ͷ͕΄ͱΜͲ • ͭ͘Γ͍ͨͷͱΘΕΔͷͱͷଥڠΛ୳Δ • ඳ͖͍ͨͷͱചΕΔͷ͕ҧ͏ອըՈͷΑ͏ͳ ͷ
• ͭ͘Γ͍ͨͷΛͭ͘ΔͨΊʹݚᮎ͢Δͱྑ͍
ਓखෆ
ਓखෆ (1/2) • ݸਓ։ൃͰਓతϦιʔε͕ಛʹෆ͢Δ • ٳͱ͔ʹยखؒʹΔͷͰ͕࣌ؒແ͍ • 1ਓͰશ෦Δඞཁ͕͋ΔͷͰ͕࣌ؒແ͍
ਓखෆ (2/2) • →పఈతʹޮԽ͢Δ͜ͱͰରॲ • ۀͰ͏ٕज़Λڞ༻͢Δ • ݸਓͰ͑Δٕज़Λ͏৫ʹॴଐ͢Δ • εέʔϧ͢Δٕज़ΛΜͰ͍ͬͯ͘
• ଞϓϩδΣΫτͱ෦Λڞ༻͢Δ
amakan.net ٕज़֓ཁ • JSONRubyͰɺHTMLJavaScriptͰੜ • t2.micro + db.t2.micro + cache.t2.micro
• AWS ECS (Pumaίϯςφ + Sidekiqίϯςφ) • AWSϦιʔεTerraformͰཧ • σϓϩΠɾΤϥʔɾδϣϒ࣮ߦͳͲSlackͰ௨ • The 12-Factor App ʹଇͬͨઃܭ
None
None
None
None
ۀͱͷؔΘΓํ
ۀͱͷؔΘΓํ (1/2) • ۀ৺ͷఈ͔Β͖ͰͬͯΔ༁Ͱͳ͍ • ۀରՁʹ߹͏ಇ͖Λ͢Εྑ͍ • ݸਓ։ൃࣗͰબΜͰ͖ͰͬͯΔ͜ͱ • ͖ͰͬͯΔ͜ͱ͙Β͍ຊؾͰΔ͖
ۀͱͷؔΘΓํ (2/2) • ݸਓ։ൃͰ৭ʑͱಥ͖٧ΊΔΑ͏ʹͳΔ • ݸਓͱۀͱͰٕज़Ϩϕϧ͕ٯసͯ͘͠Δ • ݸਓͰࢼٕͨ͠ज़Λۀʹద༻͢Δܗ • ྫ:
TerraformɺECSɺReactOnRailsɺPumaͳ ͲamakanͰࢼ͔ͯ͠ΒQiitaʹಋೖ͍ͯ͠Δ
OSSʹ͢Δ͔Ͳ͏͔
OSSʹ͢Δ͔Ͳ͏͔ (1/2) • ͭͬͨ͘ΞϓϦΛOSSʹ͢Δ͔Ͳ͏͔ • ެ։/ඇެ։ʹؔΘΒͣಉ͡Α͏ʹॻ͖͘ • ऩӹϞσϧͱอଘ͞ΕΔσʔλ࣍ୈ • ྫ:
ެ։ͭͭ͠༗ྉͰϗεςΟϯά • ྫ: ඇެ։ͰҰ෦ػೳΛOSSԽ
OSSʹ͢Δ͔Ͳ͏͔ (2/2) • amakanͰίΞػೳΛOSSԽͨ͠ • github.com/amakan/amakanize • github.com/amakan/amakankan • ͯ͘͠ΕΔਓ͕ଟͯ݁͘Ռతʹॿ͔ͬͨ
• ਓखෆղফͰ͖ΔՄೳੑ͕͋Δ
๏
ར༻نͷ࡞Γํ • άάΔͱδΣωϨʔλʔ͕ग़ͯ͘Δ (ศར) • ॻ੶: ྑ͍WebαʔϏεΛࢧ͑Δʮར༻نʯͷ࡞Γํ • ࣮ࡍΈΜͳΘΓͱίϐϖ͍ͯ͠Δ •
2લʹॻ͍ͨར༻نΛौ୩ͷͰ͔͍ձࣾʹίϐϖ͞Εͨ • ແྉαʔϏε͔༗ྉαʔϏε͔Ͱগ͠ܗ͕มΘΔ • ۀଶ͕ۙͦ͏ͳͭΛ*ࢀߟ*ʹ͢Δͱྑ͍
ϓϥΠόγʔϙϦγʔ • ར༻نͱҰॹʹͭ͘Ζ͏ • ϒϥβ֦ுొ࣌ͳͲʹ͋Δͱศར • ࠂϓϩάϥϜར༻ਃͳͲͰ͑Δ
ܦཧ
ࢧग़ • ҰൠతͳWebΞϓϦʹඞཁͳܦඅѲ͓͖ͯ͘͠ • AWSͰ͋ΕجຊEC2, RDS, Elasticache, ELB͋ͨΓ ͕ࢧత •
AWSߴ͍ɺGCPͩͱֹఔͰࡁΉɺVPSͩͱͬ ͱ͍҆ɺΈ͍ͨͳنײͷѲେࣄ • amakanສϢʔβ͙Β͍·Ͱ݄1ສԁͰࣄΓΔ
ऩೖ • amakan1000ϢʔβͰ݄4ສԁఔͷऩೖ • େͷΞϑΟϦΤΠτར͕2%͔Β5%ఔ • αʔϏεͷ༰ࣗମ͕Λѻ͏ͷ͕ϕετ • AdSenseͷؔ࿈ࠂͰऩӹཱͯΔͷͦͦ͜͜ΞΫ ηεͷ͋ΔαʔϏε͡Όͳ͍ͱݫ͍͠…
• ͜ͷลͷࣄΛ͍ͬͯΔͱαʔϏεߟ͑Δͱ͖ʹ༗ར
અ੫ • ։ۀಧΛग़͓ͯ͘͠ͱ੨৭ਃࠂͰ͖Δ • ʹҰ෦ͷେਓୡ͕ᄆ͍͍ͯΔΞϨ • αʔόɺ࡞ۀεϖʔεͳͲΛܦඅʹ • ؒສ͔Βेສઅ੫Ͱ͖ΔՄೳੑ͕͋Δ
։ۀ ํ๏ • 1. ։ۀfreeeͰ࣭߲ΛຒΊΔ • 2. ੜ͞ΕΔPDFΛ༣ૹ͢Δͱྃ • 3.
ઐ༻ͷωοτۜߦޱ࠲Λ࣋ͭͱศར • 4. ઐ༻ͷΫϨΧ͋Δͱͳ͓ྑ͍
ࣦഊࣄྫ
ࣦഊࣄྫ • amakan݄ͷऩೖ 4ສɺࢧग़1ສͩͬͨ • AmazonΞιγΤΠτʹBAN͞Εͨ • վળͯ͠࿈བྷ͕ͨ͠औΓ߹ͬͯ͘Εͣ… • ࢧग़1ສ͚͕ͩͬͨ…
• ͭΒ͍
ࣦഊ͔Βͷֶͼ • نղऍͷՄೳੑ·Ͱߟ͑ͯΑ͘ಡ͏ • ࣦഊ͢ΔͱϞνϕʔγϣϯ͕ۃʹԼ͕Δ • ऩӹ͕ҙ֎ͱϞνϕʔγϣϯʹͳ͍ͬͯͨ • ์ஔͯͯ͠ಈ͘Α͏ʹͳͬͯͯྑ͔ͬͨ •
Ұͭͷऩೖݯʹґଘ͖͢Ͱͳ͍ • Ϟνϕʔγϣϯݸਓ։ൃʹ͓͍ͯ࠷وॏͳࢿݯ
ΤλΒͳ͍ͨΊʹ
ΤλΔ • ΤλʔφϧʢӬԕͷɺՌͯ͠ͳ͍ʣΛಈࢺԽ ͤͨ͞ޠɻπΫϥʔʢRPGπΫʔϧͷϢʔ βʔʣͷؒͰੜ·Εͨɻ࡞ऀ͕ॾൠͷࣄʹ ΑΓ࡞Λ్தͰ์غ͢Δ͜ͱɺ·ͨͦͷ ঢ়ଶΛද͢ɻ
ΤλΒͳ͍ͨΊʹ • ͭ͘ΔҙຯΛࣦ͢ΔͱඞͣΤλͬͯ͠·͏ • ͭ͘ΔҙຯೋͭҎ্͓࣋ͬͯ͘ͷ͕ྑ͍ • ྫ: ࠷৽ͷRailsͷػೳΛࢼ͢ͱͯ͠͏ • ྫ:
స৬׆ಈͷͱ͖ʹ໊ΘΓʹ͏ • ྫ: Podcastͷωλͮ͘Γͱͯ͠͏ • ྫ: രྲྀߦΓΛເݟͯ։ൃΛଓ͚Δ • ์ஔͯ͠ಈ͘Α͏ʹ͓ͯ͘͜͠ͱॏཁ
ࠓͨ͜͠ͱ • Կͭͬͨ͘Β͍͍ͷ͔ • ਓखෆ • ۀͱͷؔΘΓํ • OSSʹ͢Δ͔Ͳ͏͔ •
๏ͱܦཧ • ࣦഊࣄྫ • ΤλΒͳ͍ͨΊʹ
͓ΘΓ ݸਓ։ൃͷ͍͖͔ͬͯͨ @r7kamura