Add Docker configuration and fix paths
This commit is contained in:
25
Dockerfile
Normal file
25
Dockerfile
Normal file
@@ -0,0 +1,25 @@
|
||||
FROM php:8.2-apache
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
cron \
|
||||
nano \
|
||||
libzip-dev \
|
||||
zip \
|
||||
unzip \
|
||||
&& docker-php-ext-install pdo pdo_mysql \
|
||||
&& a2enmod rewrite
|
||||
|
||||
COPY docker/contenedor-ibiza.conf /etc/apache2/sites-available/
|
||||
|
||||
WORKDIR /var/www/html
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN chmod +x /var/www/html/scripts/*.php \
|
||||
&& a2ensite contenedor-ibiza.conf \
|
||||
&& a2dissite 000-default.conf \
|
||||
&& crontab -l | { cat; echo "0 0 * * 0 /usr/bin/php /var/www/html/scripts/rotar_automatico.php >> /var/log/rotacion.log 2>&1"; } | crontab -
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
CMD ["sh", "-c", "php /var/www/html/scripts/generate-env.php && apache2-foreground"]
|
||||
Reference in New Issue
Block a user