Stu Mason
Stu Mason

Activity

Pull Request Merged

PR #32 merged: feat: Pre-built base images and improved deployment workflow

Summary

This PR addresses both Issue #30 (pre-built base images) and the PR #31 review feedback (entrypoint improvements).

๐Ÿš€ Base Images (Issue #30)

Pre-built Docker images that reduce deployment time from ~12 minutes to ~2-3 minutes.

Four variants:

ImagePHPNode
ghcr.io/stumason/laravel-coolify-base:8.38.3-
ghcr.io/stumason/laravel-coolify-base:8.48.4-
ghcr.io/stumason/laravel-coolify-base:8.3-node8.320 LTS
ghcr.io/stumason/laravel-coolify-base:8.4-node8.420 LTS

Included:

  • All PHP extensions pre-compiled (pdo_mysql, pdo_pgsql, redis, gd, bcmath, intl, opcache, pcntl, etc.)
  • nginx, supervisor, curl, git
  • GitHub Actions for nightly security rebuilds
  • Multi-arch (amd64 + arm64)

Auto-detection: Picks -node variant automatically if package.json exists.

๐Ÿ”ง Entrypoint Improvements (PR #31 feedback)

  1. Database wait with retry - Waits for DB connection before running migrations
  2. Configurable migrations - COOLIFY_AUTO_MIGRATE=false to disable
  3. Configurable timeout - COOLIFY_DB_WAIT_TIMEOUT=30 (seconds)
  4. Better output - Step-by-step progress with clear error messages

โš™๏ธ New Configuration Options

COOLIFY_USE_BASE_IMAGE=true      # Use pre-built images (default)
COOLIFY_AUTO_MIGRATE=true        # Run migrations on startup (default)
COOLIFY_DB_WAIT_TIMEOUT=30       # Seconds to wait for DB (default)

๐Ÿ“š Documentation

  • New Docker deployment guide at /docs/architecture/docker-deployment
  • Updated env vars reference
  • Base image README in docker/base/

Test plan

  • All 231 tests passing
  • Lint clean
  • Built and verified 8.4 and 8.4-node images locally
  • Verified all PHP extensions present
  • Verified Node.js in -node variants

Notes

  • Base images will be pushed to GHCR when this PR merges (workflow needs repo permissions)
  • Existing users can opt-out with COOLIFY_USE_BASE_IMAGE=false

Closes #30

Stu Mason + AI [email protected]

+1222
additions
-48
deletions
13
files changed