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
PHP7+Laravel5.3 on Google App Engine
Search
Takumi Yoshida
December 09, 2016
Technology
0
1.2k
PHP7+Laravel5.3 on Google App Engine
PHP7+Laravel5.3 on Google App Engine
Using Google app Engine Flexible Environment
Takumi Yoshida
December 09, 2016
Tweet
Share
More Decks by Takumi Yoshida
See All by Takumi Yoshida
golangで作るslackbot
ytakky2014
0
140
GKEでは StackDriver Loggingに どうやってログを送っているか
ytakky2014
3
5.3k
Auralization of Tech News +Change in technology interest for my 4 years.
ytakky2014
0
89
Webメディアでのdataflow活用
ytakky2014
1
510
睡眠をエンジニアリングする
ytakky2014
0
220
DevOps In All About
ytakky2014
0
3.5k
Other Decks in Technology
See All in Technology
Bounded Context: Problem or Solution?
ewolff
1
210
技術負債の「予兆検知」と「状況異変」のススメ / Technology Dept
i35_267
1
1k
Ask! NIKKEI RAG検索技術の深層
hotchpotch
13
2.8k
PL900試験から学ぶ Power Platform 基礎知識講座
kumikeyy
0
110
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
6
57k
自動テストの世界に、この5年間で起きたこと
autifyhq
10
7.1k
SCSAから学ぶセキュリティ管理
masakamayama
0
140
データ基盤の成長を加速させる:アイスタイルにおける挑戦と教訓
tsuda7
3
650
データ資産をシームレスに伝達するためのイベント駆動型アーキテクチャ
kakehashi
PRO
2
230
依存関係があるコンポーネントは Barrel ファイルでまとめよう
azukiazusa1
3
530
サーバーレスアーキテクチャと生成AIの融合 / Serverless Meets Generative AI
_kensh
12
3k
転生CISOサバイバル・ガイド / CISO Career Transition Survival Guide
kanny
2
390
Featured
See All Featured
Building a Scalable Design System with Sketch
lauravandoore
460
33k
Speed Design
sergeychernyshev
25
780
Docker and Python
trallard
44
3.3k
Building Applications with DynamoDB
mza
93
6.2k
The Pragmatic Product Professional
lauravandoore
32
6.4k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
10
1.3k
Git: the NoSQL Database
bkeepers
PRO
427
64k
Designing for humans not robots
tammielis
250
25k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
114
50k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
8
270
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.7k
Transcript
PHP7+Laravel5.3 on Google App Engine y.takky2014
Google App Engine is… • Paas • Language: Python, Java7,
PHP, Go • Auto Scaling • CloudSQL,BigData ….
• “App Engine runs your PHP web application using a
PHP 5.5.34 interpreter” PHP Version IUUQTDMPVEHPPHMFDPNBQQFOHJOFEPDTQIQSVOUJNF
Laravel5.3 “However, if you are not using Homestead, you will
need to make sure your server meets the following requirements: PHP >= 5.6.4 OpenSSL PHP Extension PDO PHP Extension Mbstring PHP Extension Tokenizer PHP Extension XML PHP Extension “ IUUQTMBSBWFMDPNEPDT
App Engine flexible environment • Google Compute Engine ϕʔε •
Auto Scaling • ࣮ߦڥͷఆ͕ٛͰ͖Δ • Docker Base
Step0. ४උ • Project࡞ • https://console.cloud.google.com/appengine? src=ac • Cloud SdkΠϯετʔϧ
• https://cloud.google.com/sdk/ • gcloud init • ࣗͷΞΧϯτ/projectͰೝূ͓ͯ͘͠
Step1. Laravel5.3ͷ४උ • https://github.com/laravel/laravel/releases • 5.3.16ΛDLͯ͠దͳσΟϨΫτϦʹҠಈ • ࠓճ ~/laravel5.3_on_appengine/appԼʹ Ҡಈ
• local͕php7Ͱ͋Εcomposer updateͱenv ४උ͓ͯ͘͠
Step2 make docker file • Dockerhubʹ͋ΔPHP7+ApacheΛ༻ • https://hub.docker.com/_/php/ • apacheͷઃఆϑΝΠϧͱLaravel5.3Λ
ADD͢Δ
Step3. make app.yaml • https://cloud.google.com/appengine/docs/ flexible/custom-runtimes/quickstart • ͦΜͳʹॻ͘͜ͱͳ͍
Step4. gcloud app deploy • gcloud app deploy • GAE্ʹσϓϩΠͰ͖Δ
• Dockerfile͔Βbuildͯ͠ʙͬͯײ͡ͳͷͰ ͔ͳΓ͔͔࣌ؒΔ
gcloud app browse • σϑΥϧτͷϒϥβͰ։͚Δ
Weak point • App engineʹൺͯߴ͍ 1ϲ݄Ͱ5000ԁ͙Β͍ • App engineͱ͍͍࣮࣭ͭͭCompute
Engine • ComputeEngineͷํ͕͍҆ • ෛՙߟ͑ͳ͚Εn1-standard/ Preemptible Ͱ $8ҎԼ?
Conclusion • GKE΄Ͳ͘͠ͳ͘DockerΛ͑Δɻͱ͍͏ ͍͍ • ࠓճ࡞ͬͨͷҎԼ • https://github.com/ytakky2014/ laravel5.3_on_appengine