dev-custom-crontab #23
@@ -1,6 +1,7 @@
 | 
				
			|||||||
FROM python:alpine3.18
 | 
					FROM python:alpine3.18
 | 
				
			||||||
WORKDIR /
 | 
					WORKDIR /
 | 
				
			||||||
COPY . opt
 | 
					COPY . opt
 | 
				
			||||||
 | 
					RUN apk add --no-cache supercronic
 | 
				
			||||||
RUN pip install requests
 | 
					RUN pip install requests
 | 
				
			||||||
RUN crontab /opt/crontab
 | 
					RUN crontab /opt/crontab
 | 
				
			||||||
RUN chmod +x /opt/entrypoint.sh
 | 
					RUN chmod +x /opt/entrypoint.sh
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,10 @@
 | 
				
			|||||||
#!/bin/sh
 | 
					#!/bin/sh
 | 
				
			||||||
 | 
					CRON_CONFIG_FILE="/opt/crontab"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
printenv | grep -v "no_proxy" >> /etc/environment
 | 
					# CRON
 | 
				
			||||||
 | 
					get_env CRON
 | 
				
			||||||
 | 
					CRON="${CRON:-"5 * * * *"}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
crond -f
 | 
					echo "${CRON} python /opt/crane.py" >> "${CRON_CONFIG_FILE}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					exec supercronic -passthrough-logs -quiet "${CRON_CONFIG_FILE}"
 | 
				
			||||||
		Reference in New Issue
	
	Block a user