updated Dockerfile
This commit is contained in:
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user