Good afternoon all,
I have tried to install Corteza locally using the container on Docker. I am using the default yaml and .env file verbatum form the installation page.
When I use “docker-compose -up” I watch the DB come up and the server. The issue that I am having is it seems as though the DB is refusing a connection form the server with the following error:
server_1 {“level”:“warn”,“ts”:1621887850.9424899,“logger”:“store.rdbms”,“caller”:“rdbms/rdbms.go:162”,“msg”:“could not connect to the database”,“error”:“Error 1045: Access denied for user ‘dbuser’@‘172.18.0.3’ (using password: YES)”,“try”:2,“delay”:10}
What could cause the default dbuser defined in the yml file being denied?
Yaml:
version: ‘3.5’
services:
server:
image: cortezaproject/corteza-server:latest
restart: on-failure
env_file: [ .env ]
depends_on: [ db ]
ports: [ “127.0.0.1:18080:80” ]
db:
# MySQL Database
# See Docker Hub for details
image: percona:8.0
restart: on-failure
environment:
MYSQL_DATABASE: dbname
MYSQL_USER: dbuser
MYSQL_PASSWORD: dbpass
# get the random generated password by running: docker-compose logs db | grep “GENERATED ROOT PASSWORD”
MYSQL_RANDOM_ROOT_PASSWORD: random
healthcheck: { test: [“CMD”, “mysqladmin” ,“ping”, “-h”, “localhost”], timeout: 20s, retries: 10 }
.env
########################################################################################################################
docker-compose supports environment variable interpolation/substitution in compose configuration file
(more info: https://docs.docker.com/compose/environment-variables)
########################################################################################################################
General settings
DOMAIN:18080=local.cortezaproject.org
VERSION=2021.3
########################################################################################################################
Database connection
DB_DSN=dbuser:dbpass@tcp(db:3306)/dbname?collation=utf8mb4_general_ci
########################################################################################################################
Server settings
Running all-in-one and serving web applications directly from server container
HTTP_WEBAPP_ENABLED=true
Disabled, we do not need detailed persistent logging of actions in local env
ACTIONLOG_ENABLED=false
########################################################################################################################
SMTP (mail sending) settings
Point this to your local or external SMTP server if you want to send emails.
In most cases, Corteza can detect that SMTP is disabled and skips over sending emails without an error
#SMTP_HOST=smtp-server.example.tld:587
#SMTP_USER=postmaster@smtp-server.example.tld
#SMTP_PASS=this-is-your-smtp-password
#SMTP_FROM=’“Demo” info@your-demo.example.tld’