LoginSignup
1
1

More than 5 years have passed since last update.

Meteorのあんちょこ꒰。・ω・`;꒱ デプロイ編

Last updated at Posted at 2016-07-31

Galaxy

  • GalaxyというPaasがあるらしく、これを使用すると、簡単にデプロイできるらしい。
  • 0.035USD/hour→0.84USD/day
  • "meteor bundle"コマンドを用いることで、単独で動作するNode.jsアプリケーションの形にバンドル可。Heroku等のPaasにデプロイ可。
console
$ meteor deploy test-meteor-sample.meteor.com
Talking to Galaxy servers at https://us-east-1.galaxy-deploy.meteor.com
Error deploying application: Your account is not authorized to deploy to Galaxy.

Heroku

プロジェクト作成 & ローカルで動作確認

console
$ meteor create hello

$ meteor update

$ meteor
[[[[[ ~/meteor_heroku/simple-todos ]]]]]      

=> Started proxy.                             
=> Meteor 1.4 is available. Update this project with 'meteor update'.
=> Started MongoDB.                           
=> Started your app.                          

=> App running at: http://localhost:3000/
#--> localhost:3000で動作確認

$ git init 
$ git add .
$ git commit -m "simple todos"

Herokuにデプロイ

console
$ heroku create
https://****.herokuapp.com/ | https://git.heroku.com/****.git
# ===> 動作確認


# Buildpackの設定
$ heroku buildpacks:set https://github.com/AdmitHub/meteor-buildpack-horse.git


# mongodbの設定
$ heroku addons:create mongolab
Creating mongolab-fluffy-37768... done, (free)
Adding mongolab-fluffy-37768 to salty-retreat-47355... done
Setting MONGODB_URI and restarting salty-retreat-47355... done, v3
Welcome to mLab.  Your new subscription is being created and will be available shortly.  Please consult the mLab Add-on Admin UI to check on its progress.
Use `heroku addons:docs mongolab` to view documentation.

$ heroku config:set ROOT_URL=https://****************.herokuapp.com/

# 1Dynoで運用する設定を施す
$ heroku labs:enable http-session-affinity

$ git push heroku master
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1