diff --git a/app.py b/app.py index 335dbc9..a1e040b 100644 --- a/app.py +++ b/app.py @@ -20,9 +20,9 @@ def create_app(): app = Flask(__name__) # Configure the database - app.config['SQLALCHEMY_DATABASE_URI'] = 'postgresql://postgres:1253@localhost:5432/docupulse' + app.config['SQLALCHEMY_DATABASE_URI'] = os.getenv('DATABASE_URL', 'postgresql://postgres:postgres@db:5432/docupulse') app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False - app.config['SECRET_KEY'] = 'your-secret-key-here' + app.config['SECRET_KEY'] = os.getenv('SECRET_KEY', 'your-secret-key-here') app.config['UPLOAD_FOLDER'] = os.path.join(app.root_path, 'static', 'uploads') # Initialize extensions diff --git a/stack.env b/stack.env new file mode 100644 index 0000000..1be9481 --- /dev/null +++ b/stack.env @@ -0,0 +1,11 @@ +# Web service environment variables +FLASK_APP=app.py +FLASK_ENV=production +UPLOAD_FOLDER=/app/uploads +DATABASE_URL=postgresql://postgres:postgres@db:5432/docupulse +SECRET_KEY=your-secure-secret-key-here + +# Database service environment variables +POSTGRES_USER=postgres +POSTGRES_PASSWORD=postgres +POSTGRES_DB=docupulse \ No newline at end of file