0

In my Flask application, I have config.py-file that contains database configuration and firebase configuration json that contains all secret keys etc.

How can I use different settings in my local development environment and production AWS EB environment? In local environment I connect to my local database and firebase development instance, in production I want to connect AWS RDS database and firebase production instance.

Is there any ways to change these configs on eb deploy?

2 Answers 2

1

The best way would be to use ENV variables. (To follow the 12-Factor-App)

To set ENV variables you could use eb setenv

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

Comments

0

Read more about os and dot_env

import os
from dotenv import load_dotenv

Here is more detailed documentation https://pypi.org/project/python-dotenv/

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.