Files
hotel/docker/php-server.ini
DanielS 43a0b96fdf Test server: code in a Docker volume instead of a C:\ bind mount
With Docker Desktop on Windows the bind-mounted C:\hotel made every page
take ~5-7 s; with the code on the Linux filesystem it takes ~0.1 s.

- docker/Dockerfile.server bakes the repo into the image (.dockerignore
  keeps .env, settings.inc.php and caches out)
- docker/server-entrypoint.sh copies the code into the app_code volume on
  start: pass 1 updates code but skips runtime folders (uploads, generated
  images, caches, downloaded translations, settings.inc.php), pass 2 adds
  missing files without overwriting
- docker/php-server.ini: OPcache without timestamp checks, larger
  realpath cache
- setup script waits for the container and checks the install marker
  inside the volume; .gitattributes keeps *.sh LF on Windows checkouts
- TESTSERVER.md: speed section and one-time switch from the first version

Tested with a fresh stack: full install + demo + hardening, re-run keeps
DB/uploads, rebuilt image delivers code changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 22:40:07 +01:00

16 lines
613 B
INI

; Test/production server tuning (mounted by docker-compose.server.yml).
; With Docker Desktop the code sits on a Windows drive mounted into the container,
; where every file check is slow. These settings avoid re-checking PHP files.
; After a code update (git pull) restart the app container:
; docker compose -f docker-compose.yml -f docker-compose.server.yml restart app
opcache.enable = 1
opcache.validate_timestamps = 0
opcache.memory_consumption = 256
opcache.interned_strings_buffer = 32
opcache.max_accelerated_files = 30000
opcache.save_comments = 1
realpath_cache_size = 8M
realpath_cache_ttl = 3600