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>
29 lines
955 B
YAML
29 lines
955 B
YAML
# Test-server overlay (Windows Server + Docker Desktop, or Docker in WSL).
|
|
# Your existing nginx reverse proxy terminates HTTPS and asks for a password;
|
|
# the app only listens on APP_BIND (default: all interfaces, port 8080).
|
|
# docker compose -f docker-compose.yml -f docker-compose.server.yml up -d --build
|
|
# See docker/TESTSERVER.md and docker/nginx-qloapps.conf.
|
|
#
|
|
# Speed: the code is baked into the image and copied into the volume "app_code"
|
|
# (Linux filesystem) on every start. A bind mount from C:\ makes every page ~40x slower.
|
|
# After "git pull": run the setup script again (rebuilds the image and restarts).
|
|
|
|
services:
|
|
app:
|
|
build:
|
|
context: .
|
|
dockerfile: docker/Dockerfile.server
|
|
ports: !override
|
|
- "${APP_BIND:-0.0.0.0:8080}:80"
|
|
volumes: !override
|
|
- app_code:/var/www/html
|
|
environment:
|
|
QLO_SSL: ${QLO_SSL:-1}
|
|
restart: unless-stopped
|
|
|
|
db:
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
app_code:
|