Merge branch 'master' of https://git.manabo.org/imunnic/scrapper
This commit is contained in:
18
Dockerfile
Normal file
18
Dockerfile
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# Usa una imagen oficial de Python
|
||||||
|
FROM python:3.9
|
||||||
|
|
||||||
|
# Configurar el directorio de trabajo en el contenedor
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Copiar los archivos de la aplicación al contenedor
|
||||||
|
COPY app/ /app/
|
||||||
|
|
||||||
|
# Instalar dependencias si es necesario (ajusta según tu requerimiento)
|
||||||
|
RUN pip install mysql-connector-python schedule
|
||||||
|
|
||||||
|
# Copiar el archivo de crontab y configurarlo
|
||||||
|
COPY crontab.txt /etc/cron.d/crontab
|
||||||
|
RUN chmod 0644 /etc/cron.d/crontab && crontab /etc/cron.d/crontab
|
||||||
|
|
||||||
|
# Iniciar cron y ejecutar el script en segundo plano
|
||||||
|
CMD cron && tail -f /var/log/cron.log
|
@ -1 +1 @@
|
|||||||
0 1 * * * python3 /app/main.py >> /var/log/cron.log 2>&1 #modificar para ajustar
|
0 1 * * * python3 /app/main.py >> /var/log/cron.log 2>&1
|
||||||
|
Reference in New Issue
Block a user