Error due to missing file or directory #208
-
Hello! After running TG-Spam on the command line, it writes an error in Docker: 2024-12-28 11:47:20 2024/12/28 01:47:20.575 [ ERROR] can't make spam bot, can't relaod samples, failed to open spam samples file "/srv/data/spam-samples.txt ": open /srv/data/spam-samples.txt : no such file or directory |
Beta Was this translation helpful? Give feedback.
Replies: 8 comments 1 reply
-
How exactly did you run it? What was the command line exactly ? If you used Docker Compose, please provide it as well. |
Beta Was this translation helpful? Give feedback.
-
C:\Users\Dez\Desktop\tg-spam>docker-compose up -d I ran it according to the instructions in this way. |
Beta Was this translation helpful? Give feedback.
-
Not much I can help here without seeing your docker-compose.yml and the full log. |
Beta Was this translation helpful? Give feedback.
-
2024-12-28 11:35:30 tg-spam v1.15.0-b2247b5-20241214T13:28:21 |
Beta Was this translation helpful? Give feedback.
-
services: |
Beta Was this translation helpful? Give feedback.
-
The container is periodically restarted |
Beta Was this translation helpful? Give feedback.
-
I'm not sure what place in instuctions you used to mount # example of a minimal compose file to run tg-spam
services:
tg-spam:
image: umputun/tg-spam:master # use :latest tag for production
hostname: tg-spam
restart: always
container_name: tg-spam
logging:
driver: json-file
options:
max-size: "10m"
max-file: "5"
environment:
- TELEGRAM_TOKEN
- TELEGRAM_GROUP
- FILES_DYNAMIC=/srv/dynamic
volumes:
- ./var/tg-spam:/srv/dynamic # mount volume to store dynamic files As you can see it mounts dynmaic samples, but in you compose you mount the whole data directory and likely have not put anything in. this is not a bug but invalid configuration, moved to discussions |
Beta Was this translation helpful? Give feedback.
-
Here is a screenshot from your instructions for creating the configuration file |
Beta Was this translation helpful? Give feedback.
I'm not sure what place in instuctions you used to mount
- ./data:/srv/data
, however this is wrong. this is the example from the repo:As you can see it…