Closed vfaergestad closed 4 weeks ago
Troubleshooting made me release that it is not the application itself that causes this, but docker, since it does not happen when using the binary.
Solved by specifying a folder for the output_file
to be in in both config.json
and docker-compose.yml
, for example:
{
"mattermost_domain": "your-mattermost-domain.com",
"mattermost_port": 443,
"use_tls": true,
"auth_token": "your_access_token",
"channel_ids": [
"channel_id_1",
"channel_id_2"
],
"output_file": "out/messages.json",
"insecure_skip_tls_verify": false,
"log_level": "INFO"
}
services:
mattermost-logger:
image: ghcr.io/vfaergestad/mattermost-logger:latest
container_name: mattermost-logger
volumes:
- ./config.json:/app/config.json
- ./out:/app/out
I think I should update the readme with these suggestions instead.
In the case that the specified
output_file
does not exist, the application creates a directory with theoutput_file
name instead of a file. If a file with the name already exist, it uses that file as intented.Todo:
output_file
name when file does not exist, instead of a directory.