docker-python-runner/README.md

32 lines
758 B
Markdown
Raw Normal View History

2022-09-20 08:48:15 +00:00
# docker-python-runner
2022-09-20 09:12:34 +00:00
[![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.
2022-09-20 10:53:35 +00:00
## 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:
2022-09-21 06:38:29 +00:00
TZ: Europe/Rome
2022-09-20 10:53:35 +00:00
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
```