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
WordPress x Deployer
Search
Ippei Sumida
October 21, 2017
Programming
0
830
WordPress x Deployer
WordBench舞鶴でおはなしした、Deployerのご紹介です。 #wbkyoto #deployer
Ippei Sumida
October 21, 2017
Tweet
Share
More Decks by Ippei Sumida
See All by Ippei Sumida
みんなでQAしてる話
ippey
0
49
AIで生成したものをAIでチェックしてる話
ippey
0
1.9k
『WordPressコミュニティで学ぶ』OSS貢献の多様性
ippey
0
660
25分で理解する!Symfonyの魅力とその実践的活用法
ippey
1
6.4k
素早いバリュー提供のための DROBEの新戦略
ippey
0
1.2k
Symfony 6.3のおすすめ新機能まとめ
ippey
1
1.7k
PhpStorm + GitHub Copilotはいいぞ
ippey
0
2.3k
それぞれの特徴から考えるフレームワーク選び
ippey
1
860
なるべくJavaScriptを書かないで SymfonyのUIをリッチにする Symfony UX
ippey
1
1.8k
Other Decks in Programming
See All in Programming
A Journey of Contribution and Collaboration in Open Source
ivargrimstad
0
890
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
1
100
Kaigi on Rails 2024 〜運営の裏側〜
krpk1900
1
200
みんなでプロポーザルを書いてみた
yuriko1211
0
260
What’s New in Compose Multiplatform - A Live Tour (droidcon London 2024)
zsmb
1
470
RubyLSPのマルチバイト文字対応
notfounds
0
120
Nurturing OpenJDK distribution: Eclipse Temurin Success History and plan
ivargrimstad
0
880
ActiveSupport::Notifications supporting instrumentation of Rails apps with OpenTelemetry
ymtdzzz
1
230
Creating a Free Video Ad Network on the Edge
mizoguchicoji
0
120
Streams APIとTCPフロー制御 / Web Streams API and TCP flow control
tasshi
2
350
シェーダーで魅せるMapLibreの動的ラスタータイル
satoshi7190
1
480
最新TCAキャッチアップ
0si43
0
140
Featured
See All Featured
The Cult of Friendly URLs
andyhume
78
6k
Speed Design
sergeychernyshev
24
610
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Become a Pro
speakerdeck
PRO
25
5k
The Power of CSS Pseudo Elements
geoffreycrofte
73
5.3k
Testing 201, or: Great Expectations
jmmastey
38
7.1k
Designing for Performance
lara
604
68k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
The Language of Interfaces
destraynor
154
24k
Teambox: Starting and Learning
jrom
133
8.8k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
1.9k
The Cost Of JavaScript in 2023
addyosmani
45
6.7k
Transcript
WordPress x Deployer 2017-10-21 WordBench Maizuru
ࣗݾհ ֯ాɹҰฏʢ͢Έͩɹ͍͍ͬʣ ϑϦʔϥϯεΤϯδχΞ CoderDojoຕํɹද !JQQFZ@T *QQFJTVNJEB
Agenda • What is Deployer? • ͍ํ
What is Deployer?
PHPσϓϩΠπʔϧ
None
DeployerͰͰ͖Δ͜ͱ Deploy Rollback • ϩʔΧϧ͔ΒCLIͰDeploy • CI͔ΒDeploy • SSH, SFTP,
GitରԠ • ෳαʔόॲཧՄೳ • αʔόؒॱ࣍ॲཧՄೳ • ϦϞʔτίϚϯυ࣮ߦ • ֤छRecipe͋Γ • ݩʹͤΔ • ੈཧ • ϦϞʔτίϚϯυ࣮ߦ
Deployerͷ͕͍͍͜͜ʂ
ϩΰ͕͔Θ͍͍
PHP ଞͷݴޠͷΠϯετʔϧෆཁ
CIͰಈ͘
ಋೖࣄྫ
None
Powered by
None
Powered by
σϓϩΠͰ͖ΔΑʂ
͍ํ
ΠϯετʔϧˍॳظԽ
// Πϯετʔϧ composer require deployer/deployer --dev Or composer global require
deployer/deployer // ઃఆ༻ϑΝΠϧ࡞ vendor/bin/dep init
https://gist.github.com/Ippey/ 4c5790cb0811f564822b960ef593e141
Recipe
σϑΥͰ༻ҙ͞Ε͍ͯΔϨγϐ • CakePHP • Laravel • Symfony • Drupal7,8 •
WordPress • Typo3 • And more…
ՃϨγϐ // Πϯετʔϧ composer require deployer/recipes --dev Or composer global
require deployer/recipes
ՃͰ͖ΔϨγϐ • npm • yarn • slack • hipchat •
Newrelic
͕ͳ͍
࡞ͬͨ
͍౼ͪϨγϐ // Πϯετʔϧ composer require ippey/deployer-chatwork-recipe —dev Or composer global
require ippey/deployer-chatwork-recipe
QIQ UBTL NZ@UBTL GVODUJPO \ XSJUF DPNNFOUNZ@UBTLDPNNFOU ^
UBTL NZ@UBTLCFGPSF GVODUJPO \ XSJUF DPNNFOUNZ@UBTLલʹ࣮ߦ͢ΔλεΫDPNNFOU ^ CFGPSF bNZ@UBTL` bNZ@UBTLCFGPSF` UBTL NZ@UBTLEPOF GVODUJPO \ XSJUF DPNNFOUNZ@UBTLޙʹ࣮ߦ͢ΔλεΫDPNNFOU ^ after(‘my_task’, ‘my_task:done’);
8PSE1SFTT༻ͷϨγϐΛΠϯϙʔτ SFRVJSFSFDJQFXPSEQSFTTQIQ $POpHVSBUJPO TFU SFQPTJUPSZ HJU!HJUIVCDPN*QQFZ8PSE#FODI.BJ[VSVHJU TFU HJU@UUZ USVF
<0QUJPOBM>"MMPDBUFUUZGPSHJUPOpSTUEFQMPZNFOU 8PSE1SFTT༻ϨγϐͰఆٛ͞Ε͍ͯΔͷͰෆཁ TFU TIBSFE@pMFT <> TFU TIBSFE@EJST <> TFU XSJUBCMF@EJST <>
)PTUT IPTU bWDDXUFTU ϗετ໊ VTFS bWBHSBOU Ϣʔβ TFU
bCSBODI` bNBTUFS` ར༻ϒϥϯνʢઃఆ͍ͨ࣌͠ͷΈʣ JEFOUJUZ'JMF bWNWBHSBOUNBDIJOFTWDDXUFTUWJSUVBMCPYQSJWBUF@LFZ TTIΩʔ TUBHF bQSPEVDUJPO ڥ໊ TFU EFQMPZ@QBUI bWBSXXXHJU %FQMPZઌ
5BTLT EFTD %FQMPZZPVSQSPKFDU UBTL EFQMPZ < EFQMPZQSFQBSF EFQMPZMPDL
EFQMPZSFMFBTF EFQMPZVQEBUF@DPEF EFQMPZTIBSFE EFQMPZXSJUBCMF EFQMPZDMFBS@QBUIT EFQMPZTZNMJOL EFQMPZVOMPDL DMFBOVQ TVDDFTT > <0QUJPOBM>JGEFQMPZGBJMTBVUPNBUJDBMMZVOMPDL BGUFS EFQMPZGBJMFE EFQMPZVOMPDL
ಠࣗλεΫ EFTD BDUJWBUF5XJUUFSQMVHJO UBTL BDUJWBUFUXJUUFS GVODUJPO \ SVO
DEWBSXXXHJUDVSSFOU SVO XQQMVHJOBDUJWBUFUXJUUFSQBUIWBSXXXHJUDVSSFOU ^ BGUFS EFQMPZTZNMJOL BDUJWBUFUXJUUFS
https://github.com/Ippey/WordBenchMaizuru/ blob/master/deploy.php
Deploy
vendor/bin/dep deploy [ڥ]
Rollback
vendor/bin/dep rollback [ڥ]
λεΫ࣮ߦ
vendor/bin/dep [λεΫ໊] [ڥ]
ϑΝΠϧߏ
3FMFBTFQBUI DVSSFOU SFMFBTF TIBSFE XQDPOUFOU VQMPBET
֤ϑΥϧμʹ͍ͭͯ current • ࠷৽ͷίϯςϯπ • releaseͷ࠷ऴσϓϩΠ όʔδϣϯͷSymlink • rollback=SymlinkషΓ͠ release
• ֤όʔδϣϯ͝ͱͷσʔλ • φϯόϦϯά͞ΕͯΔ • σϑΥϧτ5ͭ shared • σϓϩΠ͝ͱʹมΘΒͳ͍ ϑΝΠϧ • ྫɿwp-content/uploads • currentͷಉϑΥϧμʹ symlink
·ͱΊ • DeployerPHPσϓϩΠπʔϧ • σϓϩΠɾϩʔϧόοΫͷ΄͔ ίϚϯυ࣮ߦͰ͖Δ • ֤छϨγϐΛΈ߹ΘͤΔͱ৭ʑͰ͖Δ
None