monicahq / docker

docker image of Monica
https://hub.docker.com/_/monica/
GNU General Public License v2.0
203 stars 61 forks source link

Can not Setup Normal Docker Container Container #115

Closed theDeal closed 1 year ago

theDeal commented 2 years ago

I can not create a normal Monica hq Docker Container with the nomral Settings in my Docker docker-compose.yml.

Configuration

See my File Configuration:

version: "3.4"

services:
  app:
    image: monica
    depends_on:
      - db
    ports:
      - 8080:80
    environment:
      - APP_KEY=
      - DB_HOST=db
      - DB_USERNAME=usermonica
      - DB_PASSWORD=secret
    volumes:
      - data:/var/www/html/storage
    restart: always

  db:
    image: mysql:5.7
    environment:
      - MYSQL_RANDOM_ROOT_PASSWORD=true
      - MYSQL_DATABASE=monica
      - MYSQL_USER=usermonica
      - MYSQL_PASSWORD=secret
    volumes:
      - mysql:/var/lib/mysql
    restart: always

volumes:
  data:
    name: data
  mysql:
    name: mysql

Error Message

Seems like a Database Conection Error: Error Message:

` thrown in Standard input code on line 56 Database ready.APP_KEY already set Fatal error: Uncaught mysqli_sql_exception: Access denied for user 'monicauser'@'%' to database 'monica' in Standard input code:56  Stack trace:

0 Standard input code(56): mysqli->query('CREATE DATABASE...')

 } thrown in Standard input code on line 56 Database ready.APP_KEY already set Fatal error: Uncaught mysqli_sql_exception: Access denied for user 'monicauser'@'%' to database 'monica' in Standard input code:56  Stack trace:

0 Standard input code(56): mysqli->query('CREATE DATABASE...')

 } `