From 12f7304b126634cb96b7530453ae589c0f128f86 Mon Sep 17 00:00:00 2001 From: Chaim Date: Sun, 15 Mar 2026 14:22:47 +0000 Subject: [PATCH] Simplify: remove custom entrypoint, use Coolify post-deploy instead --- Dockerfile | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/Dockerfile b/Dockerfile index 18fed7b57f..8d024192aa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,36 +11,4 @@ COPY custom/ /var/www/html/custom/ # Ensure correct permissions RUN chown -R www-data:www-data /var/www/html/custom -# Post-deploy: clear cache and rebuild on startup -COPY --chmod=755 <<'EOF' /usr/local/bin/post-deploy.sh -#!/bin/bash -set -e - -# Wait for the original entrypoint to finish setup -sleep 5 - -# Clear cache so EspoCRM picks up new/changed extensions -if [ -d "/var/www/html/data/cache" ]; then - rm -rf /var/www/html/data/cache/* - echo "Cache cleared." -fi - -# Run rebuild if config exists (means EspoCRM is installed) -if [ -f "/var/www/html/data/config.php" ]; then - cd /var/www/html - php rebuild.php - echo "Rebuild complete." -fi -EOF - -# Wrap the original entrypoint to run post-deploy after startup -COPY --chmod=755 <<'EOF' /usr/local/bin/dev-entrypoint.sh -#!/bin/bash -# Run post-deploy in background after container starts -(post-deploy.sh &) -# Execute original entrypoint -exec docker-entrypoint.sh apache2-foreground -EOF - EXPOSE 80 -ENTRYPOINT ["dev-entrypoint.sh"]