Flask Base Application
A simple Flask web application with user authentication features.
Installation
# Clone the repository
git clone https://git.leoan.se/andreas/flask-base.git
cd flask-base
# Create and activate virtual environment (recommended)
python -m venv venv
source venv/bin/activate # On Linux/MacOS
# venv\Scripts\activate # On Windows
# Install dependencies
pip install flask flask-sqlalchemy flask-login werkzeug
# Initialize database
flask init-db
Usage
Local Development
# Start development server
flask run --host=0.0.0.0 --port=5001
# Optional: Kill any existing flask server first
pkill -f "flask run" && flask run --host=0.0.0.0 --port=5001
Docker Deployment
# Build and start container
docker-compose up --build
# For production (detached mode)
docker-compose up --build -d
The application will be available at http://localhost:5001
Persisting Data
The database will be preserved between container restarts through the ./instance volume mount.
Features
- User registration with password confirmation
- Secure password hashing
- Login/logout functionality
- SQLite database
Description
Languages
HTML
66%
Python
29.4%
Dockerfile
4.6%