2

How can we create the meteor deploying script. Currently we need to enter following command manually for deploying the app -

  • Meteor login (After pressing the enter, It will ask username and password of galaxy server account)
  • After login, We need to use command 'DEPLOY_HOSTNAME=galaxy.meteor.com meteor deploy *.meteorapp.com --settings localhost.com.json**' for deploying the app.

How to make simple shell script for above commands?

3
  • It seems not over complicated, where do you get stuck? Commented Sep 6, 2017 at 12:49
  • shell should remember login credentials. I have a batch script in Windows for that. Commented Sep 6, 2017 at 12:57
  • @TGrif actually I tried but how to put username and password automatically through script .did you know about it? Commented Sep 6, 2017 at 15:09

1 Answer 1

1

First, you should create meteor session file:

METEOR_SESSION_FILE=meteor-login.json meteor login

After successful login the meteor-login.json file will be created and it could be used later to deploy to the same account without the need to manually enter login/password.

Now, you can write sh script to deploy:

#!/bin/sh
METEOR_SESSION_FILE=meteor-login.json DEPLOY_HOSTNAME=galaxy.meteor.com meteor deploy <server> --settings <path-to-settings-file>

Don't forget to replace <server> and <path-to-settings-file> with actual values.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.