You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Mount the Docker socket (to use Docker commands)
39
+
- ./crontab.txt:/crontab.txt:ro
45
40
- /var/run/docker.sock:/var/run/docker.sock
46
41
```
47
42
48
-
### ⚠️ Ohar garrantzitsuak konfigurazioari buruz
43
+
### ⚠️ Important configuration notes
49
44
50
-
Zure `crontab.txt` fitxategia sortzean, kontuan izan hiru puntu hauek:
45
+
When creating your `crontab.txt` file, keep these three points in mind:
51
46
52
-
1. **Irteera desbideratu:** Docker-ek logak irakurri ahal izateko, komandoen irteera `/proc/1/fd/1`-era bideratu behar da.
53
-
2. **Lerro hutsa:** Fitxategiaren amaieran beti lerro huts bat utzi (bestela cron-ek ez du irakurriko).
54
-
3. **Docker Socket-a:** `docker-compose` fitxategian `/var/run/docker.sock` muntatzea ezinbestekoa da zure cron lanek `docker` komandoak exekutatu behar badituzte (adibidez:`docker restart nginx`). Honek edukiontziari baimena ematen dio "Host" makinako Docker motorra kontrolatzeko.
47
+
1. **Redirect output:** In order for Docker to read the logs, command output must be redirected to `/proc/1/fd/1`.
48
+
2. **Empty line:** Always leave an empty line at the end of the file (otherwise cron will not read it).
49
+
3. **Docker Socket:** Mounting `/var/run/docker.sock` in the `docker-compose` file is essential if your cron jobs need to execute `docker` commands (e.g., `docker restart nginx`). This grants the container permission to control the Host machine's Docker engine.
0 commit comments