Deployment
Deploy Ananas GDS to Mochahost shared hosting via cPanel file upload and manage migrations.
Environment
Ananas GDS runs on Mochahost shared hosting using cPanel, LiteSpeed web server, and WSGI. There is no SSH git push available. All code changes are deployed by uploading files via the cPanel File Manager or FTP.
| Environment | URL | Database |
|---|---|---|
| Production | app.ananas-gds.com | MariaDB |
| Test | testingarea.hotelfacts.net | MariaDB |
| Local dev | localhost | SQLite |
Deployment Checklist
.py file. The WSGI process uses ASCII encoding — non-ASCII bytes silently crash all requests to that file.python manage.py makemigrations locally. Review the generated migration files for FK dependency ordering.migrations/__init__.py exists in that app.migrations/ directory.python manage.py migrate via the cPanel Python app terminal.MariaDB Constraints
The production server has innodb_strict_mode=0 set as a workaround for row size issues. All tables must use utf8mb4 charset — charset mismatches cause silent migration failures. FK constraint ordering in migrations matters; always verify dependency order before uploading.
Installing Python Packages
Before running pip on the server, set environment variables:
source ~/.bashrc
export PKG_CONFIG_PATH=~/pkgconfig:/usr/lib64/pkgconfig
pip install <package> --break-system-packages
pycairo requires a custom ~/pkgconfig/cairo.pc file which is permanently present in the home directory. Source ~/.bashrc before any pip install.
WSGI & ASCII Encoding
wsgi.py includes a permanent patch: sys.stdout/stderr.reconfigure(encoding='utf-8'). Do not remove this. Never add emoji or non-ASCII characters to any .py file, including comments.