Add GHCR registry support and fix PDF generation in Docker containers#172
Add GHCR registry support and fix PDF generation in Docker containers#172
Conversation
Co-authored-by: thawn <1308449+thawn@users.noreply.github.com>
Co-authored-by: thawn <1308449+thawn@users.noreply.github.com>
…ent platform limitation Co-authored-by: thawn <1308449+thawn@users.noreply.github.com>
…ment Removed update-ca-certificates command and adjusted pip install commands to remove --native-tls option.
|
@copilot I found the problem: the chromium pdf creation command is: |
When the server is started with --port or --host command-line arguments, these values are now persisted to the database. This ensures that PDF generation (which uses the port from the database config) uses the correct port that the server is actually listening on. Fixes issue where chromium PDF generation was using the default port 10020 from the database instead of the actual server port (e.g., 8080) when started with --port argument in Docker containers. Co-authored-by: thawn <1308449+thawn@users.noreply.github.com>
Fixed in commit 586f312. When |
b7635c9 to
fa22f6e
Compare
PDF generation in Docker containers was failing with
ERR_CONNECTION_REFUSEDbecause chromium couldn't connect tolocalhost. Additionally, there was no fast iteration cycle for testing Docker builds.Changes
Workflow enhancements
.github/workflows/docker-build-test.yml: Addedpush_to_ghcrparameter and build step for GitHub Container Registry.github/workflows/docker-pr.yml: Enabled GHCR push for PRs (tagged aspr<number>).github/workflows/ghcr-cleanup.yml: New workflow for daily cleanup of test images (3-day retention)PR builds now automatically push to
ghcr.io/thawn/ttmp32gme:pr<number>for immediate testing.PDF generation fixes
src/ttmp32gme/print_handler.py: Changed chromium URL fromhttp://localhost:{port}/pdftohttp://127.0.0.1:{port}/pdfIn Docker containers,
localhostcan fail to resolve due to network namespace isolation. The explicit loopback address ensures reliable connection.src/ttmp32gme/ttmp32gme.py: Command-line--portand--hostarguments are now persisted to the databaseWhen the server is started with
--portor--hostcommand-line arguments, these values are now saved to the database usingdb.set_config_value(). This ensures that PDF generation (which reads the port from the config) uses the correct runtime port instead of the database default (10020).This fixes the issue where chromium was using the default port (10020) from the database instead of the actual server port (e.g., 8080) when started with the
--portargument in Docker containers.Dockerfile fixes
resources/build_assets/docker/Dockerfile: Replaced broken uv install script with official container image:COPY --from=ghcr.io/astral-sh/uv:latest--native-tlsflag for SSL certificate handlingOriginal prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.