Add Redis healthchecks and startup wait in PHP entrypoint
- Introduce Redis healthchecks in `docker-compose.prod.yml` for better container monitoring. - Extend PHP Dockerfile with `redis-tools` and enable Composer dependency auto-install. - Update `docker-entrypoint.sh` to wait for Redis readiness before starting PHP-FPM. - Remove local Nginx override and simplify development setup.
This commit is contained in:
@@ -27,6 +27,7 @@ RUN set -eux; \
|
||||
unzip \
|
||||
git \
|
||||
curl \
|
||||
redis-tools \
|
||||
libzip-dev \
|
||||
libssl-dev \
|
||||
ca-certificates \
|
||||
@@ -62,11 +63,11 @@ ENV COMPOSER_ALLOW_SUPERUSER=1
|
||||
WORKDIR /var/www/html
|
||||
|
||||
# Copy and enable entrypoint that installs Composer deps on first run
|
||||
#COPY services/php/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
|
||||
#RUN chmod +x /usr/local/bin/docker-entrypoint.sh
|
||||
COPY services/php/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
|
||||
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
|
||||
|
||||
# Expose port 9000
|
||||
EXPOSE 9000
|
||||
|
||||
#ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
|
||||
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
|
||||
CMD ["php-fpm"]
|
||||
Reference in New Issue
Block a user