BlueGit

projects-timfalken-com microchess

Overview

Activity

NovDecJanFebMarAprMayJunJulAugSepOctNov

27 contributions in the last 12 months

LessMore

Commits, merge requests and comments.

microchess
README.md

Microchess

A 4 × 5 chess app with friends, invitation links, rematches, personal avatars and SQLite storage.

The complete production application is in web/. Files outside that folder are for repository tooling and CI only. Start locally:

php -S 127.0.0.1:8080 -t web web/router.php

Localhost automatically uses a test account, including when served through Apache. See web/README.md for setup, OAuth configuration, rules and tests.

GitLab CI/CD

The default branch is master. .gitlab-ci.yml runs PHP/chess/API tests, JavaScript checks and a real FTP fixture test. Only after all checks pass does it deploy web/ using ci/deploy.py. Production deployments cannot run concurrently.

Required CI variables:

VariableValue
timftphostFTP/FTPS/SFTP hostname or URL
timftpuserLogin name
timftppasswordPassword; configure as masked/protected in GitLab
projectftpExisting remote application directory, relative to the FTP login root or absolute

The mirror preserves the entire production data/ directory, including configuration, database, WAL, sessions and backups. Its access-denying .htaccess is installed separately. Test artifacts, the development router and the application README are excluded from upload. Obsolete application files outside these exclusions are removed.

TLS certificates are verified. First-time SFTP host keys use SSH's accept-new policy; changed keys fail. The remote directory must already exist. Configure OAuth separately in the generated data/config.php on production: local configuration is never committed or uploaded.

The deployment fixture can also run locally with Python 3, pyftpdlib and lftp:

python3 ci/test_deploy.py