up
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
# Dockerfile para contenedor de mantenimiento
|
||||
FROM alpine:3.19
|
||||
|
||||
# Instalar herramientas necesarias incluyendo PHP
|
||||
RUN apk add --no-cache \
|
||||
bash \
|
||||
php82 \
|
||||
php82-pdo \
|
||||
php82-pdo_mysql \
|
||||
php82-mysqli \
|
||||
php82-curl \
|
||||
php82-json \
|
||||
php82-mbstring \
|
||||
php82-openssl \
|
||||
php82-redis \
|
||||
mariadb-client \
|
||||
curl \
|
||||
tzdata \
|
||||
dcron \
|
||||
logrotate \
|
||||
gzip && \
|
||||
ln -sf /usr/bin/php82 /usr/bin/php
|
||||
|
||||
# Configurar zona horaria
|
||||
ENV TZ=America/Bogota
|
||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||
|
||||
# Crear directorios de trabajo
|
||||
RUN mkdir -p /backups /scripts /var/log/cron
|
||||
|
||||
# Copiar scripts de mantenimiento
|
||||
COPY docker/maintenance/scripts/ /scripts/
|
||||
RUN chmod +x /scripts/*.sh
|
||||
|
||||
# Configurar crontab
|
||||
COPY docker/maintenance/crontab /etc/crontabs/root
|
||||
|
||||
# Script de inicio
|
||||
COPY docker/maintenance/entrypoint.sh /entrypoint.sh
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
WORKDIR /scripts
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
Reference in New Issue
Block a user