System Requirements
Before installing Bar Galileo, ensure your system meets these requirements:Python
Version 3.11 or higher
MySQL/MariaDB
Version 5.7+ or MariaDB 10.3+
Memory
Minimum 2GB RAM
Installation Methods
- Standard Installation
- Docker Installation
1. Clone the Repository
Get the Bar Galileo source code:2. Create Virtual Environment
Isolate your Python dependencies:Your terminal prompt should now show
(.venv) indicating the virtual environment is active.3. Install System Dependencies
Install MySQL client libraries required by themysqlclient package:4. Install Python Dependencies
Install all required packages from requirements.txt:This may take several minutes. Key packages include:
- Django 5.2.4 - Web framework
- Django Channels 4.3.1 - WebSocket support
- mysqlclient 2.2.7 - MySQL database adapter
- reportlab 4.2.5 - PDF generation
- openpyxl 3.1.5 - Excel export
- sentence-transformers 3.3.1 - AI embeddings for RAG chat
Database Configuration
MySQL Setup
Secure MySQL Installation
- Set root password
- Remove anonymous users
- Disable remote root login
- Remove test database
Create Database and User
Log into MySQL:Create the database with proper character encoding:Create a dedicated user:Grant privileges:Verify and exit:
Environment Configuration
Create Environment File
Bar Galileo uses environment variables for sensitive configuration. Create a.env file:
Required Environment Variables
Add the following tobar_galileo/bar_galileo/.env:
Configuration Details
Here’s how settings.py loads these variables:bar_galileo/bar_galileo/settings.py
Database Migrations
Run migrations to create all database tables:Migrations create tables for all Bar Galileo modules: products, tables, orders, inventory, expenses, payroll, reports, notifications, and backups.
Create Admin User
Create a superuser account to access the admin interface:Static Files Collection
For production deployments, collect static files:staticfiles/ directory.
In development mode with
DEBUG=True, Django serves static files automatically.Running the Server
Development Server
For basic development:Production-like Server (Recommended)
For full functionality including WebSockets:run_server.sh
The
run_server.sh script:- Enables WebSocket support for real-time notifications
- Binds to
0.0.0.0for network access - Auto-reloads on file changes (Python, HTML, CSS, JS)
- Shows local IP for mobile device testing
Production Deployment
Security Settings
For production, update your.env:
DEBUG=False, Django automatically enables:
- SSL redirect (
SECURE_SSL_REDIRECT=True) - Secure cookies (
SESSION_COOKIE_SECURE=True) - HSTS headers
- CSRF protection
bar_galileo/bar_galileo/settings.py
Using Daphne (ASGI Server)
Using systemd Service
Create a systemd service file:/etc/systemd/system/bargalileo.service
Verification
Verify your installation:Check Server
Visit http://localhost:8000 - you should see the Bar Galileo login page.
Troubleshooting
Error: No module named 'MySQLdb'
Error: No module named 'MySQLdb'
Install MySQL client libraries:
Error: Access denied for user
Error: Access denied for user
Check your database credentials in
.env:- Verify
DB_USERandDB_PASSWORDmatch what you created - Test MySQL connection:
mysql -u bar_galileo_user -p
Error: (2002) Can't connect to MySQL server
Error: (2002) Can't connect to MySQL server
Ensure MySQL is running:
Static files not loading
Static files not loading
Collect static files:Check
STATIC_ROOT in settings.py is writable.WebSockets not working
WebSockets not working
- Use
run_server.shor Daphne instead ofrunserver - Check that Channels is installed:
pip show channels - Verify ASGI configuration in
asgi.py
Next Steps
Quickstart
Follow the quickstart guide to create your first product
Configuration
Configure OAuth, email, backups, and more
API Reference
Explore Bar Galileo’s REST API
User Management
Set up roles, permissions, and staff accounts
Need Help?
If you encounter issues not covered here:- Check the Django logs for detailed error messages
- Review the GitHub repository for documentation
- Contact the Bar Galileo team at [email protected]
Bar Galileo is actively maintained by the team at Bar Galileo in Sogamoso, Boyacá, Colombia.
