SmilyOrg / photofield

Experimental fast photo viewer.
MIT License
417 stars 7 forks source link

Unable to find configuration.yaml file in data directory #2

Closed asitemade4u closed 2 years ago

asitemade4u commented 2 years ago

Describe the bug When using docker-compose, the stack is unable to open the configuration.yaml file and, as a result, does not publish photos

To Reproduce Steps to reproduce the behavior:

  1. I create a configuration.yaml file (following the defaults in the documentation) into the local directory bound to the /app/data directory in the stack
  2. I give 777access rights to the file (not secure, but for now I want to eliminate any access right issues)
  3. I docker-compose up or, in my case, use Portainer
  4. The stack is launched, the container is launched too but it does not publish anything on the chosen port.
  5. The log reports this error:
2021/11/07 12:40:51 unable to open configuration.yaml, using defaults (open configuration.yaml: no such file or directory)

I checked within the container for the configuration.yaml file: it is indeed there with the right content.

Expected behavior The container should publish photos on the chosen port.

Environment Debian 10

SmilyOrg commented 2 years ago

Hey, thanks for reporting!

I think I found the issue - I forgot to set the right default for PHOTOFIELD_DATA_DIR in the published Docker image making it look in /app instead of /app/data for the yaml.

I'll fix it soon, but meanwhile, you should be able to fix it by adding the PHOTOFIELD_DATA_DIR=./data env var.

SmilyOrg commented 2 years ago

I've published v0.1.10 that should fix this, please let me know if it works for you! 😊

SmilyOrg commented 2 years ago

Latest #13 should also print the configuration path 👍