monicahq / docker

docker image of Monica

Home Page:https://hub.docker.com/_/monica/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hardcoded database password?

mmance opened this issue · comments

commented

I don't see an easy way to change it, if you deviate from "secret" then it errors out. Took me a while to realize that.

commented

I have found two variables that monica picks up on for database. If you set these in your .env to your new values then profit.

DB_USERNAME
DB_PASSWORD

You just have to change the environment variable.

  1. change it directly when creating the docker instance:

    docker run -d -p 8080:80 -e DB_PASSWORD=newpassword monica
    

    (and use the same password on the mysql instance)

  2. or change it in the docker-compose.yml file:

    app:
      image: monica
      environment:
        - DB_PASSWORD=newpassword
    
  3. or change it in the .env file that you use to run the instance

    app:
      image: monica
      env_file: .env
    

See examples files!