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.

EnvironmentURLDatabase
Productionapp.ananas-gds.comMariaDB
Testtestingarea.hotelfacts.netMariaDB
Local devlocalhostSQLite

Deployment Checklist

1
Verify no non-ASCII characters in any modified .py file. The WSGI process uses ASCII encoding — non-ASCII bytes silently crash all requests to that file.
2
Run python manage.py makemigrations locally. Review the generated migration files for FK dependency ordering.
3
If a new Django app was added, confirm migrations/__init__.py exists in that app.
4
Upload changed files via cPanel File Manager. Upload migrations to the correct app migrations/ directory.
5
Run python manage.py migrate via the cPanel Python app terminal.
6
Restart the Python application via cPanel.
7
Smoke-test critical paths: login, properties list, API v1 facts endpoint.

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:

Mochahost pip install
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.