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
ビルドが遅い
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Kizashi Nagata
March 14, 2024
650
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
ビルドが遅い
ビルドが遅いなあと思ってたけど速くなった話をLTしてきました
https://nakanoshima-dev.connpass.com/event/308398/
Kizashi Nagata
March 14, 2024
Transcript
16 slides
ビルドが遅い nakanoshima.dev#36 コンテナについて話したい、助けてほしい人集まれLT大会 2024/3/13 株式会社インゲージ 永田 兆
自己紹介 • 永田 兆(ながた きざし) • @kizashi1122 • 独立系SIer、BtoB SaaS 会社を経て •
2014年よりインゲージ社(創業メンバー) ◦ 創業時よりCTO ◦ 自社サービス Re:lation の開発 ◦ 当初 バックエンドやインフラを担当 • 2児の父(長男小5、長女小3) 2
会社紹介 • 株式会社インゲージ • 代表取締役 CEO 和田 哲也 • 創業 2014年1月11日
• 大阪府大阪市北区芝田1-14-8 梅田北プレイス
サービス紹介
Chatwork とチャネル連携リリース(先々週) 5
6
デプロイって時間かかりますよね • 昔 Java やってたころは、WARファイルを作って Tomcat のあるサーバーに FTP(S) でファイル送って、サーバ再起動して終わりだった。 •
Rails をさわるようになってからは(EC2 に直起動) Capistrano を使ってデ プロイしていた。時間もデプロイ開始から5分くらいで終わってた。 7
Docker を使うようになって • CodePipeline でデプロイ ◦ Pull 型のデプロイ ◦ Source
→ Build → Deploy • Build に時間がかかる! 8
Dockerfile や buildspec ファイルやら見直した • Dockerfile 内の使わないソフトのインストールをやめる • buildspec ◦
docker build の引数に --build-arg BUILDKIT_INLINE_CACHE=1 を指定 ◦ 環境変数に export DOCKER_BUILDKIT=1 • しかし大きな効果はなく 9
それとは別に • docker build 内で webpack でバンドル中に以下のエラーがおこったりおこら なかったりすることがあった 10
write EPIPE 対応 • この対応で build stage のインスタンスを BUILD_GENERAL1_MEDIUM にした
11
結果 • エラーもなくなって、ビルドも速くなった • ビルドを速くするつもりはなかったので副産物的な成果。30分→15分。 12
今は • webpack をやめて、vite を使ってることもあり 15 分→12分に。 • 実験 ◦
さっき BUILD_GENERAL1_LARGE (一つ上)で試してみたら12分→10分に。 ◦ 逆に BUILD_GENERAL1_SMALL にしてみたら yarn run build でエラー(2回実施して2回と も) 13
懇親会にて • bun https://bun.sh/ を使えば、yarn install が速くなるよ! と教えて頂きま した 14
15 インゲージではエンジニアを募集しています!
ご清聴ありがとうございました 16
More Decks by Kizashi Nagata
See All by Kizashi Nagata
SQS の使い方を わかっていなかった / I didn't know how to use SQS correctly
kizashi1122
0
960
aws-vault を使った セキュアなアクセスキー管理 / Manage AWS Access Key More Securely By Using aws-vault
kizashi1122
0
1.2k
inotify の話 / About inotify
kizashi1122
0
820
B2Bクラウドサービスをゼロから立ち上げて、利用社数が1000社を超えるまでの道のり / a startup started B2B SaaS business from ground zero
kizashi1122
0
1.2k
Rails でつくるマルチテナント型Webアプリケーション / multi-tenant web application building with Rails
kizashi1122
1
2.9k
Featured
See All Featured
The untapped power of vector embeddings
frankvandijk
2
2k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
22k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
400
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Side Projects
sachag
456
43k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.9k
Producing Creativity
orderedlist
PRO
348
41k
From π to Pie charts
rasagy
1
460
We Have a Design System, Now What?
morganepeng
55
8.4k
Intergalactic Javascript Robots from Outer Space
tanoku
273
28k
A designer walks into a library…
pauljervisheath
211
25k
Context Engineering - Making Every Token Count
addyosmani
9
1.3k