BlueGit

projects-timfalken-com microchess

Restore configured FTP certificate policy for production hosting

timfa Tim Falken · pushed by timfa

Authored 2026-09-08 · 2 months ago

Hash
cc5af5295f83f5c500916e3fab490970f3bfb64a
Parent
cb525b19
3 files changed +4 −3
README.md +1 −1
@@ -25,7 +25,7 @@ Required CI variables:
25 25
26 26 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.
27 27
28 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.
28 FTP TLS certificate verification is disabled for this hosting account, as configured by the owner. 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.
29 29
30 30 The deployment fixture can also run locally with Python 3, `pyftpdlib` and `lftp`:
31 31
@@ -25,7 +25,7 @@ Required CI variables:
25
25
26The 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.
26The 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.
27
27
28TLS 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.
28FTP TLS certificate verification is disabled for this hosting account, as configured by the owner. 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.
29
29
30The deployment fixture can also run locally with Python 3, `pyftpdlib` and `lftp`:
30The deployment fixture can also run locally with Python 3, `pyftpdlib` and `lftp`:
31
31
ci/deploy.py +2 −1
@@ -30,7 +30,8 @@ def deployment_commands(environ, webroot):
30 30 'set net:timeout 20',
31 31 'set net:max-retries 2',
32 32 'set net:reconnect-interval-base 3',
33 'set ssl:verify-certificate yes',
33 # This hosting account uses a mismatched FTP certificate; retain the owner's deployment policy.
34 'set ssl:verify-certificate no',
34 35 'set ftp:list-options -a',
35 36 # New SFTP hosts are remembered within this runner; changed host keys fail.
36 37 'set sftp:connect-program "ssh -a -x -o StrictHostKeyChecking=accept-new"',
@@ -30,7 +30,8 @@ def deployment_commands(environ, webroot):
30 'set net:timeout 20',
30 'set net:timeout 20',
31 'set net:max-retries 2',
31 'set net:max-retries 2',
32 'set net:reconnect-interval-base 3',
32 'set net:reconnect-interval-base 3',
33 'set ssl:verify-certificate yes',
33 # This hosting account uses a mismatched FTP certificate; retain the owner's deployment policy.
34 'set ssl:verify-certificate no',
34 'set ftp:list-options -a',
35 'set ftp:list-options -a',
35 # New SFTP hosts are remembered within this runner; changed host keys fail.
36 # New SFTP hosts are remembered within this runner; changed host keys fail.
36 'set sftp:connect-program "ssh -a -x -o StrictHostKeyChecking=accept-new"',
37 'set sftp:connect-program "ssh -a -x -o StrictHostKeyChecking=accept-new"',
web/README.md +1 −1
@@ -43,7 +43,7 @@ location ~* ^/(README\.md|router\.php)$ { deny all; }
43 43
44 44 Use a normal PHP-FPM configuration that only executes existing PHP files. Verify that `/data/microchess.sqlite`, `/data/config.php` and `/lib/bootstrap.php` return 403 before putting real data in the app. Only the PHP user should have filesystem write access to `data/`.
45 45
46 Deploy this directory's contents. Preserve the entire production `data/` directory: exclude `data/` itself and all descendants from upload **and deletion**, including `config.php`, `.htaccess`, the database and WAL files. The included CI script creates `data/` and installs its `.htaccess` separately before mirroring; do the same when deploying manually. Never upload your development database or `tests/artifacts/`. The root `.gitlab-ci.yml` runs PHP syntax, chess/API tests, JavaScript syntax checks and an isolated FTP deployment test before deploying `master`. Deployments are serialized with a production resource group. FTP credentials are passed to lftp through its password environment variable; TLS certificates are verified.
46 Deploy this directory's contents. Preserve the entire production `data/` directory: exclude `data/` itself and all descendants from upload **and deletion**, including `config.php`, `.htaccess`, the database and WAL files. The included CI script creates `data/` and installs its `.htaccess` separately before mirroring; do the same when deploying manually. Never upload your development database or `tests/artifacts/`. The root `.gitlab-ci.yml` runs PHP syntax, chess/API tests, JavaScript syntax checks and an isolated FTP deployment test before deploying `master`. Deployments are serialized with a production resource group. FTP credentials are passed to lftp through its password environment variable; FTP TLS certificate verification is disabled for this hosting account, as configured by the owner.
47 47
48 48 SQLite supports a single application instance with concurrent requests; writes use `BEGIN IMMEDIATE`, game versions reject stale actions, and invitation acceptance is atomic. Keep the database on local persistent storage. Use SQLite's backup API for live backups; copying just the `.sqlite` file while WAL is active can miss transactions.
49 49
@@ -43,7 +43,7 @@ location ~* ^/(README\.md|router\.php)$ { deny all; }
43
43
44Use a normal PHP-FPM configuration that only executes existing PHP files. Verify that `/data/microchess.sqlite`, `/data/config.php` and `/lib/bootstrap.php` return 403 before putting real data in the app. Only the PHP user should have filesystem write access to `data/`.
44Use a normal PHP-FPM configuration that only executes existing PHP files. Verify that `/data/microchess.sqlite`, `/data/config.php` and `/lib/bootstrap.php` return 403 before putting real data in the app. Only the PHP user should have filesystem write access to `data/`.
45
45
46Deploy this directory's contents. Preserve the entire production `data/` directory: exclude `data/` itself and all descendants from upload **and deletion**, including `config.php`, `.htaccess`, the database and WAL files. The included CI script creates `data/` and installs its `.htaccess` separately before mirroring; do the same when deploying manually. Never upload your development database or `tests/artifacts/`. The root `.gitlab-ci.yml` runs PHP syntax, chess/API tests, JavaScript syntax checks and an isolated FTP deployment test before deploying `master`. Deployments are serialized with a production resource group. FTP credentials are passed to lftp through its password environment variable; TLS certificates are verified.
46Deploy this directory's contents. Preserve the entire production `data/` directory: exclude `data/` itself and all descendants from upload **and deletion**, including `config.php`, `.htaccess`, the database and WAL files. The included CI script creates `data/` and installs its `.htaccess` separately before mirroring; do the same when deploying manually. Never upload your development database or `tests/artifacts/`. The root `.gitlab-ci.yml` runs PHP syntax, chess/API tests, JavaScript syntax checks and an isolated FTP deployment test before deploying `master`. Deployments are serialized with a production resource group. FTP credentials are passed to lftp through its password environment variable; FTP TLS certificate verification is disabled for this hosting account, as configured by the owner.
47
47
48SQLite supports a single application instance with concurrent requests; writes use `BEGIN IMMEDIATE`, game versions reject stale actions, and invitation acceptance is atomic. Keep the database on local persistent storage. Use SQLite's backup API for live backups; copying just the `.sqlite` file while WAL is active can miss transactions.
48SQLite supports a single application instance with concurrent requests; writes use `BEGIN IMMEDIATE`, game versions reject stale actions, and invitation acceptance is atomic. Keep the database on local persistent storage. Use SQLite's backup API for live backups; copying just the `.sqlite` file while WAL is active can miss transactions.
49
49