arpanghosh8453/public-fitbit-projects

File permission issue when running "docker-compose run publicfitbitprojects"

badi95 opened this issue · 6 comments

badi95 commented

When trying to get the system setup and I run docker-compose run publicfitbitprojects I keep getting the following error:

Successfully tagged publicfitbitprojects:latest
WARNING: Image for service publicfitbitprojects was built because it did not already exist. To rebuild this image you must use `docker-compose build` or `docker-compose up --build`.
Creating fitbit-data_publicfitbitprojects_run ... done
Traceback (most recent call last):
  File "/app/Fitbit_Fetch.py", line 39, in <module>
    with open(FITBIT_LOG_FILE_PATH, "w"): pass
PermissionError: [Errno 13] Permission denied: '/app/logs/fitbit.log'

Could you let me know if you updated the FITBIT_LOG_FILE_PATH variable with a valid path? It seems the issue is the internal /app/logs/fitbit.log path is not accessible, so I am wondering if it was mapped to a path on your disk correctly.

badi95 commented

I didn't change anything i the docker compose file except for CLIENT_ID and CLIENT_SECRET. I can try changing it to a path on my host system and see if that makes a difference.

badi95 commented

This time I got this error FileNotFoundError: [Errno 2] No such file or directory:

Do you already have the grafana influxdb setup? Try running the py file only without using docker. You NEED to update the variables with placeholders.

badi95 commented

Ok I ended up being able to get to the token request by changing making a fibit-logs diretory in top level directory and FITBIT_LOG_FILE_PATH to fitbit-logs. The issue seems to be from the appuser trying to access the logs volume.

Thank you for the information. I hope you enjoy the dashboard :)