Docker with JHipster

Docker with JHipster

「キノコがDockerについて勉強する会」で発表したLT資料です!
https://kinoko-hoge.connpass.com/event/88048/

JHipsterでDockerを使う方法をさらっと紹介しています。

87e94dd0e8a5f52de58a0e4a0b1a1f3f?s=128

Shinichi Kozake

June 30, 2018
Tweet

Transcript

  1. %PDLFSXJUI +)JQTUFS

  2. 8IPBN*

  3. 4ZTUFN"SDIJUFDU +BWB !T@LP[BLF 8IPBN* 4ZTUFN"SDIJUFDU

  4. ۙگ ʴ େن໛Ҋ݅ͱઈࢍ֨ಆதʂ

  5. ࣭໰ʂ https://flic.kr/p/4ms8ZA

  6. &Q7-PQY,*KRUVGT!

  7. #TG7,*KRUVGT!

  8.   +)JQTUFSJTB:FPNBOHFOFSBUPS 4QSJOH#PPU "OHVMBS3FBDU Ϟμϯ8FCΞϓϦέʔγϣϯΛૉૣ͘࡞ΕΔ͜ͱΛ໨త Φʔϓϯιʔε :FPNBO͸Ϟμϯ8FCΞϓϦέʔγϣϯΛఏڙ͢Δ4DB⒎PMEπʔϧ ͢΂ͯ(JU)VCͰ։ൃɻ"QBDIFMJDFOTFEɻ IUUQTHJUIVCDPNKIJQTUFSHFOFSBUPSKIJQTUFS

    +)JQTUFSJT
  9.   4DB⒎PME5PPMJT ʮTDB⒎PMEʢεΩϟϑΥʔϧυʣʯ͸ʮ଍৔ʯͱ͍͏ҙຯͰ͢ɻ ʮ଍৔ʯͱ͍͏໊ͷ௨ΓɺΞϓϦέʔγϣϯͷͻͳܗͱͳΔ ιʔείʔυΛࣗಈੜ੒͠·͢ɻ

  10.   +)JQTUFSΛ༻͍Δ͜ͱͰ ͢͹΍͘Ϟμϯ8FCΞϓϦέʔγϣϯ ͷ਽ܗΛ࡞Δ͜ͱ͕Ͱ͖·͢ʂ

  11. )PXUPDSFBUFBQQ

  12.   ্هίϚϯυΛ࣮ߦ͢Δͱɺ+)JQTUFSͷΞϓϦέʔγϣϯ࡞੒͕࢝·Γ·͢ɻ NLEJSEPDLFS"QQ DEEPDLFS"QQ ZPKIJQTUFS

  13.   ͍͔ͭ͘ͷ࣭໰ʹ౴͑Δͱ ύοέʔδ໊͸ʁ σʔλϕʔε͸ʁ ϓϩμΫτ͸ʁ ΞϓϦ໊͸ʁ ։ൃ͸ʁ .BWFO PS

    (SBEMF ೝূํࣜ͸ʁ "OHVMBS PS 3FBDU FUDFUD
  14.   Server application generated successfully. Client application generated successfully.

    ϓϩδΣΫτͷ४උ͕Ͱ͖·ͨ͠ʂ
  15.   ্هίϚϯυΛ࣮ߦ͢Δͱɺ ϙʔτͰ8FCΞϓϦέʔγϣϯ͕ىಈ͠·͢ɻ HSBEMFX NWOX 03

  16.   ϒϥ΢βͰMPDBMIPTUͷϙʔτʹ઀ଓ͢Δͱɺ +)JQTUFSͰੜ੒͞Εͨ8FCΞϓϦέʔγϣϯը໘͕දࣔ͞Ε·͢ɻ

  17.   ΞΧ΢ϯτೝূΛબ୒ͯ͠ϩάΠϯ͠·͢ɻ ೝূ΍ೝՄͷ࢓૊Έ͕࠷ॳ͔Β༻ҙ͞Ε͍ͯ·͢ɻ ΦϓγϣϯʹΑΓ4PDJBMϩάΠϯ΋༻ҙ͞Ε·͢ɻ

  18.   BENJOͱVTFSͷΞΧ΢ϯτ͕σϑΥϧτͰ༻ҙ͞Ε͍ͯ·͢ɻ ॳظύεϫʔυ͸ΞΧ΢ϯτ໊ͱಉ͡Ͱ͢ɻ

  19.   BENJOΞΧ΢ϯτͰϩάΠϯ͢ΔͱɺΤϯςΟςΟ΍؅ཧ͕ φϏήʔγϣϯλϒʹදࣔ͞Ε·͢ɻ

  20.   JO *OUFSOBUJPOBMJ[BUJPO ΋༻ҙ͞Ε͓ͯΓɺ ݴޠλϒʹΑΓදࣔݴޠΛ੾Γସ͑Δ͜ͱ͕ՄೳͰ͢ɻ

  21.   ΞϓϦέʔγϣϯΛ؅ཧ͢Δҝͷ༷ʑͳػೳ͕༻ҙ͞Ε͍ͯ·͢ɻ ྫ͑͹؅ཧϝτϦΫεΛબ୒͢Δͱɺ+7.ͷঢ়ଶ΍ )551ϦΫΤετ਺ͳͲΛ֬ೝ͢Δ͜ͱ͕Ͱ͖·͢ɻ

  22.   ؅ཧϔϧενΣοΫΛબ୒͢Δͱɺ σʔλϕʔε΍σΟεΫεϖʔεͷঢ়ଶΛ֬ೝ͢Δ͜ͱ͕Ͱ͖·͢ɻ

  23.   ؅ཧઃఆΛબ୒͢Δͱɺ 4QSJOHDPOpHVSBUJPO΍TZTUFN&OWJSPONFOUͳͲɺ ֤छΞϓϦέʔγϣϯ؀ڥઃఆΛදࣔͰ͖·͢ɻ

  24.   ؅ཧϩάΛબ୒͢Δͱɺϩάઃఆͷ֬ೝ΍มߋ͕Ͱ͖·͢ɻ

  25.   ؅ཧ"1*Λબ୒͢Δͱɺ4XBHHFS6*ʹΑΔ8FC"1*ͷυΩϡϝϯτ ΛදࣔͰ͖·͢ɻ

  26.   શ͕ͯ࠷ॳ͔Β8FC"QQMJDBUJPOʹ༻ҙʂʂ

  27. %PDLFSXJUI+)JQTUFS

  28.   BQQ   ࡞੒͞ΕͨγεςϜߏ੒  ,FZDMPBL #SPXTFS 

    σʔλϕʔεʹ1PTUHSF42-ɺೝূʹ0"VUIΛબ୒ͨ͠৔߹
  29.   ্هίϚϯυΛ࣮ߦ͢Δͱɺ ຊ൪؀ڥ 1SPE ͷΞϓϦέʔγϣϯ%PDLFSΠϝʔδ͕࡞੒͞Ε·͢ɻ HSBEMFXCPPU8BS1QSPECVJME%PDLFS NWOXQBDLBHF1QSPEEPDLFSpMFCVJME 03

  30.   ্هίϚϯυΛ࣮ߦ͢Δͱɺ ΞϓϦέʔγϣϯͱͦΕ͕ґଘ͢ΔαʔϏεʢ1PTUHSF42-ɺ,FZDMPBLʣ Λىಈ͠·͢ EPDLFSDPNQPTFGTSDNBJOEPDLFSBQQZNMVQ

  31.   version: '2' services: dockerapp-app: image: dockerapp environment: #

    - _JAVA_OPTIONS=-Xmx512m -Xms256m - SPRING_PROFILES_ACTIVE=prod,swagger - SPRING_DATASOURCE_URL=jdbc:postgresql://ʙ : - JHIPSTER_SLEEP=10 ports: - 8080:8080 dockerapp-postgresql: extends: file: postgresql.yml service: dockerapp-postgresql keycloak: extends: file: keycloak.yml service: keycloak BQQZNM
  32.   ্هίϚϯυΛ࣮ߦ͢Δͱɺ4POBSͰίʔυΛ෼ੳ͠·͢ɻ EPDLFSDPNQPTFGTSDNBJOEPDLFSTPOBSZNMVQ HSBEMFXTPOBS 03 NWOXTPOBSTPOBS ্هίϚϯυͰ4POBSΛ࣮ߦͯ͠

  33.   ෼ੳ݁Ռ͸ɺMPDBMIPTUʹΞΫηε͢ΔͱݟΕ·͢ɻ

  34. None
  35. 5SZ+)JQTUFS

  36. 5IBOLZPVBMM GPSMJTUFOJOH (((ο( ƅ˜ƅ*)ο)))