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

為何我從heroku轉戰AWS Elastic Beanstalk

blue chen
November 07, 2013
550

為何我從heroku轉戰AWS Elastic Beanstalk

blue chen

November 07, 2013
Tweet

Transcript

  1. heroku config:set USER_NAME=blue process.env.USER_NAME var  config  =  require(path.join(__dirname,  '/',  

    'config.json')); 會被⾃自動指向/app 底下的config.json 環境設定⼀一定要
  2. {    "port":  3000,    "host":  "localhost",    "controllers":  "controllers",

       "error":  {        "format":  "{level:1}{module:3}{code:2}",        "file":  "errors"    },    "logger":  {        "level":  "debug",        "dir":  "log",        "filename":  "%s.log"    },    "packages":  {        "sequelize":  {                        "db":  "yourdbname",                "username":  "yourusername",                "password":  "yourpassword",                "options":  {                        "host":  "yourhost"                }        },              "users":  {                            "redis-­‐database":  2,            "token-­‐expire":  604800,            "nonce-­‐expire":  300        }    } } 苦
  3. The WebSockets protocol is not yet supported on the Cedar

    stack. 如果真的很想⽤用socket.io 要切到xhr-polling
  4. EC2 ELB SNS AutoScaling S3 必修 選修 Amazon RDS、Amazon DynamoDB、

    Amazon SimpleDB、Microsoft SQL Server、Oracle、IBM DB2 或 Informix 有GUI幫你包到好.也可透過Cli去update 你的產品 (git也可以)
  5. VPC常⽤用四個架構 I. VPC with Public Subnet Only 2. VPC with

    Public and Private Subnet Only 3. VPC with Public and Private Subnet and hardware VPN 4. VPC with Private Subnet and hardware VPN