在引擎码上设置环境变量 [英] Set Environment variables on Engine Yard

查看:95
本文介绍了在引擎码上设置环境变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序在Engine Yard服务上,我需要设置环境变量以使用我的机密ID和密码。

My app is on Engine Yard services and I need to set the environment variables to work with my secret id and password.

有人知道如何设置每个变量?最好的方法是什么?

Somebody know how I can set each variables? What is the best way to do this?

推荐答案

我刚刚设法为在Unicorn上运行的应用程序设置了环境变量。

I've just managed to set environment variables for my application running on Unicorn.


  1. 打开/data/{app_name}/shared/config/env.custom并对其进行编辑,如下所示:

  1. Open /data/{app_name}/shared/config/env.custom and edit it to look like this:

export SECRET_ID=yourid
export SECRET_PASSWORD=yourpass


  • 重新启动独角兽 / engineyard / bin / app_ {app_name}重新加载

    如果您使用的是乘客,请查看:

    https://stackoverflow.com/a/12955526/1520775

    https://github.com/jimneath/ey-cloud-recipes/tree/master/cookbooks/passenger_env_vars

    If you are using passenger take a look at:
    https://stackoverflow.com/a/12955526/1520775
    https://github.com/jimneath/ey-cloud-recipes/tree/master/cookbooks/passenger_env_vars

    这篇关于在引擎码上设置环境变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

  • 查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆