Upgrade to Pro — share decks privately, control downloads, hide ads and more …

WordPress x Deployer

WordPress x Deployer

WordBench舞鶴でおはなしした、Deployerのご紹介です。 #wbkyoto #deployer

Ippei Sumida

October 21, 2017
Tweet

More Decks by Ippei Sumida

Other Decks in Programming

Transcript

  1. DeployerͰͰ͖Δ͜ͱ Deploy Rollback • ϩʔΧϧ͔ΒCLIͰDeploy • CI͔ΒDeploy • SSH, SFTP,

    GitରԠ • ෳ਺αʔόॲཧՄೳ • αʔόؒॱ࣍ॲཧՄೳ • ϦϞʔτίϚϯυ࣮ߦ • ֤छRecipe͋Γ • ݩʹ໭ͤΔ • ੈ୅؅ཧ • ϦϞʔτίϚϯυ࣮ߦ
  2. // Πϯετʔϧ composer require deployer/deployer --dev Or composer global require

    deployer/deployer // ઃఆ༻ϑΝΠϧ࡞੒ vendor/bin/dep init
  3.  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’);
  4. 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 <> 
  5. )PTUT IPTU bWDDXUFTU ϗετ໊  VTFS bWBHSBOU Ϣʔβ  TFU

    bCSBODI` bNBTUFS` ར༻ϒϥϯνʢઃఆ͍ͨ࣌͠ͷΈʣ  JEFOUJUZ'JMF bWNWBHSBOUNBDIJOFTWDDXUFTUWJSUVBMCPYQSJWBUF@LFZ TTIΩʔ TUBHF bQSPEVDUJPO ؀ڥ໊ TFU EFQMPZ@QBUI bWBSXXXHJU %FQMPZઌ
  6. 5BTLT EFTD %FQMPZZPVSQSPKFDU  UBTL EFQMPZ < EFQMPZQSFQBSF  EFQMPZMPDL

     EFQMPZSFMFBTF  EFQMPZVQEBUF@DPEF  EFQMPZTIBSFE  EFQMPZXSJUBCMF  EFQMPZDMFBS@QBUIT  EFQMPZTZNMJOL  EFQMPZVOMPDL  DMFBOVQ  TVDDFTT >  <0QUJPOBM>JGEFQMPZGBJMTBVUPNBUJDBMMZVOMPDL BGUFS EFQMPZGBJMFE EFQMPZVOMPDL 
  7. ಠࣗλεΫ EFTD BDUJWBUF5XJUUFSQMVHJO  UBTL BDUJWBUFUXJUUFS GVODUJPO \  SVO

    DEWBSXXXHJUDVSSFOU   SVO XQQMVHJOBDUJWBUFUXJUUFSQBUIWBSXXXHJUDVSSFOU  ^  BGUFS EFQMPZTZNMJOL BDUJWBUFUXJUUFS 
  8. ֤ϑΥϧμʹ͍ͭͯ current • ࠷৽ͷίϯςϯπ • release಺ͷ࠷ऴσϓϩΠ
 όʔδϣϯͷSymlink • rollback=SymlinkషΓ௚͠ release

    • ֤όʔδϣϯ͝ͱͷσʔλ • φϯόϦϯά͞ΕͯΔ • σϑΥϧτ͸5ͭ shared • σϓϩΠ͝ͱʹมΘΒͳ͍
 ϑΝΠϧ • ྫɿwp-content/uploads • current಺ͷಉϑΥϧμʹ
 symlink