Compare commits
2 Commits
7ca40edfcf
...
8832fe3061
| Author | SHA1 | Date | |
|---|---|---|---|
| 8832fe3061 | |||
| aee26682db |
4
app.py
4
app.py
@@ -20,9 +20,9 @@ def create_app():
|
|||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
|
|
||||||
# Configure the database
|
# 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['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')
|
app.config['UPLOAD_FOLDER'] = os.path.join(app.root_path, 'static', 'uploads')
|
||||||
|
|
||||||
# Initialize extensions
|
# Initialize extensions
|
||||||
|
|||||||
@@ -7,19 +7,15 @@ services:
|
|||||||
- "10335:5000"
|
- "10335:5000"
|
||||||
volumes:
|
volumes:
|
||||||
- ./uploads:/app/uploads
|
- ./uploads:/app/uploads
|
||||||
environment:
|
env_file:
|
||||||
- FLASK_APP=app.py
|
- stack.env
|
||||||
- FLASK_ENV=development
|
|
||||||
- UPLOAD_FOLDER=/app/uploads
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
|
|
||||||
db:
|
db:
|
||||||
image: postgres:13
|
image: postgres:13
|
||||||
environment:
|
env_file:
|
||||||
- POSTGRES_USER=postgres
|
- stack.env
|
||||||
- POSTGRES_PASSWORD=postgres
|
|
||||||
- POSTGRES_DB=docupulse
|
|
||||||
volumes:
|
volumes:
|
||||||
- postgres_data:/var/lib/postgresql/data
|
- postgres_data:/var/lib/postgresql/data
|
||||||
|
|
||||||
|
|||||||
11
stack.env
Normal file
11
stack.env
Normal file
@@ -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
|
||||||
Reference in New Issue
Block a user