Hiding secure django settings info on webfaction

前端 未结 2 598
無奈伤痛
無奈伤痛 2021-01-07 12:29

I am trying to hide secure info like database password of a django application on webfaction.
But I could not find how and where to set these infos using environmental v

2条回答
  •  Happy的楠姐
    2021-01-07 13:07

    Add them to your bash_profile.

    Once you SSH in run:

    nano ~/.bash_profile
    

    Then add your desired variables and save it. Example:

    export DATABASE_URL=postgres://username:password@host:port/databasename
    

    This will create an environment variable named DATABASE_URL with the contents of your string. To test, run echo $DATABASE_URL in your terminal.

提交回复
热议问题