You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/tag Build is passing
Details
|
8 months ago | |
---|---|---|
docker | 8 months ago | |
.drone.yaml | 9 months ago | |
.gitignore | 9 months ago | |
LICENSE | 9 months ago | |
README.md | 8 months ago |
README.md
docker-python-runner
Base docker container for running python scripts.
usage
version: '3.6'
services:
runner:
image: docker.asperti.com/paspo/python-runner:latest
container_name: python-scripts
restart: unless-stopped
volumes:
- ./scripts:/scripts
- ./logs:/var/log
- ./crontabs:/etc/cron.d:ro
environment:
TZ: Europe/Rome
mkdir scripts logs crontabs
touch scripts/test.py && chmod +x scripts/test.py
touch scripts/test2.py && chmod +x scripts/test2.py
cat <<EOF >crontabs/myscripts
*/5 7-22 * * * /scripts/test.py
*/10 7-22 * * * /scripts/test2.py
EOF
docker-compose up -d