-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathexample_compose.yml
More file actions
27 lines (26 loc) · 932 Bytes
/
example_compose.yml
File metadata and controls
27 lines (26 loc) · 932 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
services:
cron:
image: ghcr.io/wikiteq/cron
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./logs/cron:/var/log/cron
environment:
- COMPOSE_PROJECT_NAME=${COMPOSE_PROJECT_NAME}
- DEBUG=${CRON_DEBUG:-0}
labels:
# Enable cron scheduling for the cron container itself
- cron.enabled=true
# Log archiving job - runs monthly and creates archives when a period accumulates 100 files
- cron.archive_cron_logs.schedule=@monthly
- cron.archive_cron_logs.command=archive-cron-logs 100
app:
build: ./app
container_name: app
labels:
# Enable cron scheduling for this container
- cron.enabled=true
# Example cron jobs
- cron.mytask.schedule=* * * * *
- cron.mytask.command=/usr/local/bin/app_script.sh
- cron.another_task.schedule=*/2 * * * *
- cron.another_task.command=/usr/local/bin/another_app_script.sh