Explorar el Código

add settings for heroku

Yuki Takei hace 9 años
padre
commit
cb47367bbd
Se han modificado 4 ficheros con 13 adiciones y 1 borrados
  1. 1 1
      Procfile
  2. 4 0
      app.json
  3. 7 0
      bin/heroku/install-plugins.sh
  4. 1 0
      package.json

+ 1 - 1
Procfile

@@ -1 +1 @@
-web: node app.js
+web: npm run server:prod:container

+ 4 - 0
app.json

@@ -16,6 +16,10 @@
     "PASSWORD_SEED": {
       "description": "A password seed is used by password hash generator. ",
       "generator": "secret"
+    },
+    "INSTALL_PLUGINS": {
+      "description": "Comma-separated list of plugin package names to install.",
+      "value": "crowi-plugin-lsx"
     }
   },
   "addons": [

+ 7 - 0
bin/heroku/install-plugins.sh

@@ -0,0 +1,7 @@
+#!/bin/sh
+
+export IFS=","
+
+for plugin in $INSTALL_PLUGINS; do
+  npm install --save $plugin
+done

+ 1 - 0
package.json

@@ -26,6 +26,7 @@
     "clean:js": "rimraf -- public/js",
     "clean:dll": "rimraf -- public/dll",
     "clean": "npm run clean:js && npm run clean:dll",
+    "heroku-prebuild": "sh bin/heroku/install-plugins.sh && npm run build:prod",
     "mkdirp": "mkdirp",
     "plugin:def": "node bin/generate-plugin-definitions-source.js",
     "prebuild:dev": "env-cmd config/env.dev.js npm run plugin:def",