Skip to content

Commit

Permalink
run fix for envars
Browse files Browse the repository at this point in the history
  • Loading branch information
eliaspcs committed Apr 12, 2023
1 parent 42894ef commit 0dc2943
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
9 changes: 4 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,8 @@ RUN /usr/local/bin/python -m pip install --no-cache-dir -r requirements.txt
# Copy the script into the container
COPY telepinger.py .

# set up the cron job
RUN echo "*/$MINUTES_INTERVAL * * * * /usr/local/bin/python /app/telepinger.py -c $PING_PACKETS -i $PING_INTERVAL $PING_HOST > /proc/1/fd/1 2>&1" | crontab -
RUN crontab -l
# Copy the entrypoint script into the container
COPY entrypoint.sh .

# Start cron in the foreground
CMD ["cron", "-f"]
# Set the entrypoint
ENTRYPOINT ["/app/entrypoint.sh"]
8 changes: 8 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh

# Set up the cron job
echo "*/$MINUTES_INTERVAL * * * * /usr/local/bin/python /app/telepinger.py -c $PING_PACKETS -i $PING_INTERVAL $PING_HOST > /proc/1/fd/1 2>&1" | crontab -
crontab -l

# Start cron in the foreground
exec cron -f

0 comments on commit 0dc2943

Please sign in to comment.