Skip to content

Conversation

@alexandrecuer
Copy link
Contributor

At least these scripts must be executable :-)
As you mount the backend folder in the compose file, all the chmod in the backend dockerfile are no more relevant.

anyway, could not manage to start successfully the docker compose stack

got this return from the api container (other container run successfully)

sqlalchemy.exc.OperationalError: (pymysql.err.OperationalError) (1044, "Access denied for user 'emontools'@'%' to database 'emontools127.0.0.1:3306/emontools'")

before I add an error with the API searching for a .env file with no success, so i mounted the .env file for the docker-compose folder in the emon_api container as a volume :

mon_api:
    build:
      context: ../../backend
      dockerfile: Dockerfile
    env_file:
      - ./.env
    volumes:
      - ./env:/.env
      - ../../backend:/opt/emon_tools/backend
      - ./alembic:/opt/emon_tools/backend/alembic/versions
      - ../../datas:/opt/emon_tools/datas
      - ../../static:/opt/emon_tools/static

@mano8
Copy link
Member

mano8 commented Aug 21, 2025

Hi,

The above error :

sqlalchemy.exc.OperationalError: (pymysql.err.OperationalError) (1044, "Access denied for user 'emontools'@'%' to database 'emontools127.0.0.1:3306/emontools'")

Is Fixed in Fix FastApi db connection error #33 pull request. Have introduced bad MySQL URL formatting by mistake.

As you mount the backend folder in the compose file, all the chmod in the backend dockerfile are no more relevant.

You are true, in dev docker-compose container, but plan to have prod container without need to mount backend folder in the compose file later.

before I add an error with the API searching for a .env file with no success, so i mounted the .env file for the docker-compose folder in the emon_api container as a volume :

You don't need to set .env file as volume this will work as is, with fixed bugs ;-).

Need to improve this package and README.md.

But don't see any changes you made on this repository?

I can close this pull request no?

Thank's for your report

@alexandrecuer
Copy link
Contributor Author

@mano8 : there is no content change in the files, and so you dont see anything on github, but they are now executable scripts through the command chmod +x.
image
see the last x
previously, they were not, and the compose was crashing cause of that

@mano8
Copy link
Member

mano8 commented Aug 22, 2025

apologies ja ja ja
thanks.

@mano8 mano8 merged commit 3156aac into vemonitor:main Aug 22, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants