other method to do env
This commit is contained in:
4
app.py
4
app.py
@@ -20,9 +20,7 @@ def create_app():
|
||||
app = Flask(__name__)
|
||||
|
||||
# Configure the database
|
||||
# Use 'db' as host when running in Docker, 'localhost' for local development
|
||||
db_host = 'db' if os.getenv('DOCKER_ENV') else 'localhost'
|
||||
app.config['SQLALCHEMY_DATABASE_URI'] = os.getenv('DATABASE_URL', f'postgresql://postgres:1253@{db_host}:5432/docupulse')
|
||||
app.config['SQLALCHEMY_DATABASE_URI'] = os.getenv('DATABASE_URL')
|
||||
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
|
||||
app.config['SECRET_KEY'] = os.getenv('SECRET_KEY', 'your-secret-key-here')
|
||||
app.config['UPLOAD_FOLDER'] = os.path.join(app.root_path, 'static', 'uploads')
|
||||
|
||||
Reference in New Issue
Block a user