Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hardcoded database password? #38

Closed
mmance opened this issue Feb 4, 2021 · 2 comments
Closed

Hardcoded database password? #38

mmance opened this issue Feb 4, 2021 · 2 comments

Comments

@mmance
Copy link

mmance commented Feb 4, 2021

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.

@mmance
Copy link
Author

mmance commented Feb 4, 2021

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

@mmance mmance closed this as completed Feb 4, 2021
@asbiin
Copy link
Member

asbiin commented Feb 4, 2021

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!

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

No branches or pull requests

2 participants