updated Dockerfile

This commit is contained in:
2025-04-25 15:46:14 +03:00
parent 0bdc0d287e
commit c553975e82
3 changed files with 39 additions and 5 deletions

View File

@@ -20,9 +20,6 @@ COPY /BankServices/RoutineEmailService /
# Make run_app.sh executable
RUN chmod +x /run_app.sh
# 11:00 Istanbul Time (UTC+3) system time is 08:00 UTC
RUN echo "0 8 * * * /run_app.sh >> /var/log/cron.log 2>&1" > /tmp/crontab_list && crontab /tmp/crontab_list
COPY /Schemas /Schemas
COPY /Controllers /Controllers
COPY /BankServices/ServiceDepends /
@@ -33,5 +30,8 @@ ENV PYTHONPATH=/ PYTHONUNBUFFERED=1 PYTHONDONTWRITEBYTECODE=1
# Create log file to grab cron logs
RUN touch /var/log/cron.log
# Run cron setup and tail the log file for user to monitor logs
CMD cron && tail -f /var/log/cron.log
# Make entrypoint script executable
RUN chmod +x /entrypoint.sh
# Use entrypoint script to update run_app.sh with environment variables and start cron
ENTRYPOINT ["/entrypoint.sh"]