Docker compose and startup adjustments

This commit is contained in:
Eduardo Silva 2024-04-04 21:16:53 -03:00
parent 563ee7408e
commit a194e4f0be
8 changed files with 56 additions and 8 deletions

View file

@ -2,4 +2,4 @@
*/5 * * * * root /usr/bin/curl -s http://routerfleet:8001/cron/generate_backup_schedule/ >> /var/log/cron.log 2>&1
* * * * * root /usr/bin/curl -s http://routerfleet:8001/cron/create_backup_tasks/ >> /var/log/cron.log 2>&1
* * * * * root /usr/bin/curl -s http://routerfleet:8001/cron/perform_backup_tasks/ >> /var/log/cron.log 2>&1
*/10 * * * * root /usr/bin/curl -s http://routerfleet:8001/cron/housekeeping/ >> /var/log/cron.log 2>&1
*/10 * * * * root /usr/bin/curl -s http://routerfleet:8001/cron/housekeeping/ >> /var/log/cron.log 2>&1

View file

@ -8,7 +8,7 @@ RUN apt-get update && apt-get install -y \
nano \
vim-nox \
fping \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

View file

@ -93,6 +93,9 @@ def update_and_monitor():
if __name__ == "__main__":
print(f"{datetime.now()} - Monitoring container started, waiting for routerfleet container to start...")
time.sleep(30) # Wait for the routerfleet container to start
print(f"{datetime.now()} - Starting monitoring service...")
update_and_monitor()