publish Docker images to GHCR and optimize web Dockerfile - #3434
Mateusz-Krajewski wants to merge 4 commits into
Conversation
|
Thanks for putting this together — I appreciate the work that went into it. I'm going to pass on merging this. The Compose file in the repo is there for local development, and that's as far as I want to take Docker in Cloudlog. Publishing official images (and changing the default stack around GHCR) would mean taking on Docker support for users, which I'm not in a position to do. You're still free to run Cloudlog in containers however you like; that part is up to each installer. I just don't want Cloudlog itself to ship and support pre-built images. Thanks again for the contribution. |
Fair enough, I completely understand your decision regarding maintenance overhead. As a side note, you might want to look into the current docker-compose.yml setup: Currently, the application doesn't actually consume the variables passed via env_file here. It might be worth explicitly documenting whether configuration should be handled via a copied .env file or native environment variables, as well as allowing define('ENVIRONMENT', 'development'); to be toggled via an environment variable rather than hardcoded in the source. Thanks for reviewing! |
Summary
Improve deployments using pre-built container images and speed up / slim down the PHP Apache image build.
Changes
docker-publish): Build and pushcloudlog-webandcloudlog-dbto GitHub Container Registry (ghcr.io). Tags follow semver (MAJOR.MINOR.PATCH), plusworkflow_dispatch. Multi-archlinux/amd64andlinux/arm64only (nolinux/arm/v7for the DB image—the official MariaDB image does not ship that variant).docker-compose.prod.yml(pullthenup).Dockerfile: Single layer for APT cleanup + PHP extensions (docker-php-ext-install -j$(nproc)),--no-install-recommends, enablecurlPHP extension (used by the app), writeuploads.iniwithprintf, fewer layers overall..dockerignore: Much smaller build context by excluding large dirsNotes for reviewers
docker compose pullworks in prod/CI without a localbuild.