How to deploy a meteor application to my own server?

后端 未结 6 908
灰色年华
灰色年华 2020-11-30 17:27

How to deploy a meteor application to my own server?

flavour 1: the development and deployment server are the same;

flavour 2: the development server is one

6条回答
  •  天命终不由人
    2020-11-30 17:37

    I had a lot of trouble with meteor up, so I decided writing my own deploy script. I also added additional info how to set up nginx or mongodb. Hope it helps!

    See /sh folder in repository

    What the script meteor-deploy.sh does:

    1. Select environment (./meteor-deploy.sh for staging, ./meteor-deploy.sh prod for production)
    2. Build and bundle production version of the meteor app
    3. Copy bundle to server
    4. SSH into server
    5. Do a mongodump to backup database
    6. Stop the running app
    7. Unpack bundle
    8. Overwrite app files
    9. Re-install app node package dependencies
    10. Start the app (uses forever)

    Tested for the following server configurations:

    • Ubuntu 14.04.4 LTS
    • meteor --version 1.3.2.4
    • node --version v0.10.41
    • npm --version 3.10.3

提交回复
热议问题