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

Node.jsサーバアプリケーションの 稼働方法 ~基本からDockerまで~

Node.jsサーバアプリケーションの 稼働方法 ~基本からDockerまで~

Akiyoshi Tanaka

May 09, 2019
Tweet

More Decks by Akiyoshi Tanaka

Other Decks in Programming

Transcript

  1. /PEFKT8FCαʔόಈ࡞ྫ ιʔε $ curl http://localhost:8000 Fri May 03 2019 13:00:25

    GMT+0900 (JST) αʔόىಈ ΫϥΠΞϯτ
 ΞΫηε $ node index.js
  2. 1.

  3. ϓϩηεϚωʔδϟQNσϓϩΠ module.exports = { apps: [{ name: "app", script: "app.js"

    }], deploy: { production: { key: "/path/to/some.pem", user: "ubuntu", host: ["192.168.0.13"], ref: "origin/master", repo: "[email protected]:Username/repository.git", path: "/var/www/my-repository", 'post-deploy': "npm install", }, } } FDPTZTUFNDPOpHKT IUUQTQNJPEPDFOSVOUJNFHVJEFFBTZEFQMPZXJUITTI
  4. ϓϩηεϚωʔδϟQNϚϧνϓϩηε DMVTUFS GPSL ιʔεमਖ਼ ෆཁ ඞཁ ϙʔτׂ౰ ϚελʔͷΈ ͭ ϓϩηε͝ͱ

    ෳ਺ ىಈํ๏ DMVTUFSϞδϡʔϧ DIJME@QSPDFTTGPSL ϩʔυόϥϯγϯά ༗ ແ εςΟοΩʔ
 ηογϣϯ ෆՄ -#ଆͰՄ
  5. ϩʔϦϯάߋ৽ ίϯςφ W ίϯςφ W ίϯςφ W ίϯςφ W ৽͍͠όʔδϣϯΛىಈ

    ৽όʔδϣϯͷૄ௨͕֬ೝͰ͖Ε͹
 چόʔδϣϯΛࢭΊΔ