better entrypoint, crontab in env
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing

This commit is contained in:
2022-09-20 12:53:35 +02:00
parent ff52dbda78
commit 036592473b
3 changed files with 34 additions and 1 deletions

View File

@@ -3,3 +3,28 @@
[![Build Status](https://drone.asperti.com/api/badges/paspo/docker-python-runner/status.svg)](https://drone.asperti.com/paspo/docker-python-runner)
Base docker container for running python scripts.
## usage
```yaml
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
environment:
CRONTAB: >
*/5 7-22 * * * /scripts/test.py
*/10 7-22 * * * /scripts/test2.py
```
```bash
mkdir scripts logs
touch scripts/test.py && chmod +x scripts/test.py
touch scripts/test2.py && chmod +x scripts/test2.py
docker-compose up -d
```