2013-06-14 4 views

답변

4

매력적으로 사용하십시오.

https://github.com/oortcloud/heroku-buildpack-meteorite

+0

항상 그렇지는 않습니다. 이 빌드 팩'node'가 Heroku에 의해 유효한 명령으로 인식되지 않는 상황에 처하게됩니다.'bash : node : command not found'. Meteor 0.6.3을 사용하고 있어도 다른 빌드 팩을 사용하면 Meteor 앱의 기본 JavaScript 파일에 오류가 발생합니다. 'Meteor'(객체)가 인식되지 않습니다. 질문에서 언급 한 buildpack의 작성자가 Meteor 0.6.x의 buildpack을 업데이트하는 것을 고려 중이므로 곧 문제가 해결 될 것입니다. –

+0

"bash : node : command not found"로 고심 - Meteor 0.6.5.1 –

0

저는 두에게 Heroku에 유성 응용 프로그램 (두 앱은 mongolab에 연결되어 있으므로 외부 MongoDB의 인스턴스)를 실행하고 있습니다. 내가 그것을 어떻게

은 여기 문서화 한 다음 bash: node: command not found 문제에 문제가 사람들로 .../how-to-deploy-meteor-on-heroku-with.html

1

, 나는 그것도 통해 가서 내가 Procfile을 삭제하여 그것을 해결.

분명히 Procfile은 Heroku가 node main.js을 사용하여 앱을 실행하지만 노드가 PATH varialbe 등에 포함되어 있지 않기 때문에 유효한 명령이 아님을 나타냅니다.

Procfile을 삭제하면 Heroku가 앱이 유성 앱임을 감지하고 전체 경로와 함께 노드 바이너리를 사용하여 실행합니다.

의견 대신 답변을 게시 해 주셔서 죄송합니다. 그러나 내 평판으로 인해 댓글을 남길 수 없습니다.

또한, http로 태초 ROOT_URL 설정해야 기억 : //

6

내가 Heroku가 제대로 배포 유성 0.8.2를 얻기 위해 약간의 작업을해야했다. 나는 나를 위해 일한 일련의 단계를 게시하고있다. 당신이 그렇게한다면, 매개 변수화 된 Bash 스크립트로 바꿀 수있다.

# Define Meteor/Heroku app name: 
export APP_NAME='Your-App-Name-Here' 

# Create Meteor app: 
meteor create --example leaderboard "${APP_NAME}" 
cd "${APP_NAME}" 
git init . 
git add . 
git commit -m 'Initial commit' 

if (heroku apps | egrep --silent "^${APP_NAME}$") 
then 
    # If re-using an existing Heroku app: 
    echo "Heroku app '${APP_NAME}' already exists; configuring..." 
    git remote remove heroku 
    heroku git:remote -a "${APP_NAME}" 
    heroku config:set \ 
     BUILDPACK_URL=https://github.com/oortcloud/heroku-buildpack-meteorite.git 
else 
    # If creating the Heroku app for the first time: 
    echo "Creating Heroku app '${APP_NAME}'..." 
    heroku create --stack cedar --app "${APP_NAME}" \ 
     --buildpack https://github.com/oortcloud/heroku-buildpack-meteorite.git 
fi 

heroku config:add ROOT_URL="http://${APP_NAME}.herokuapp.com" 

# Make sure you have a verified account to enable the mongohq:sandbox add-on 
heroku addons:add mongohq:sandbox 

# Visit: https://addons-sso.heroku.com/apps/${APP_NAME}/addons/mongohq:sandbox 
open "https://addons-sso.heroku.com/apps/${APP_NAME}/addons/mongohq:sandbox" 

# - Click 'add a database user' 
# - Enter a user name and password, and click 'Add user' 
# - Click 'Overview' tab 

# Set the following variables appropriately, based on the user name, password, and 
# values within the 'Mongo URI' string in the Overview tab 
export MONGO_DB_HOST='kahana.mongohq.com' 
export MONGO_DB_PORT='db-port' 
export MONGO_DB_NAME='db-name' 
export MONGO_DB_USER='db-user' 
export MONGO_DB_PASS='db-pass' 

# Calculate connection string and URL: 
export MONGO_DB_CONN="${MONGO_DB_HOST}:${MONGO_DB_PORT}/${MONGO_DB_NAME}" 
export MONGO_DB_URL="mongodb://${MONGO_DB_USER}:${MONGO_DB_PASS}@${MONGO_DB_CONN}" 

# If you have mongo client installed, verify the connection: 
export MONGO_CMD='mongo' 
"${MONGO_CMD}" "${MONGO_DB_CONN}" -u "${MONGO_DB_USER}" -p"${MONGO_DB_PASS}" 

heroku config:add MONGO_URL="${MONGO_DB_URL}" 

# Verify configs look okay: 
heroku config 

# Configure a public/private SSH key pair in order to perform builds: 
export HEROKU_RSA_NAME='[email protected]' 
export HEROKU_RSA_FILE=~/.ssh/"${HEROKU_RSA_NAME}" 

# If creating the keys for the first time: 
[[ -f "${HEROKU_RSA_FILE}" ]] || { 
    ssh-keygen -t rsa -f "${HEROKU_RSA_FILE}" 
    ssh-add "${HEROKU_RSA_FILE}" 
} 

heroku keys:add "${HEROKU_RSA_FILE}.pub" 

# Deploy the Meteor app via Git and the custom build pack: 
git push heroku master 

# Any errors? 
heroku logs 

# Make sure the Heroku app is running using one web dyno: 
heroku ps:scale web=1 

# Test the app 
heroku open 
관련 문제