diff --git a/Dockerfile b/Dockerfile index 7d08ff1..1e3af35 100644 --- a/Dockerfile +++ b/Dockerfile @@ -32,7 +32,7 @@ ENV GAMMU_PIN "1234" ENV GAMMU_DEBUG_LEVEL "0" ENV MYSQL_HOST "localhost" -ENV MYSQL_USERNAME "root" +ENV MYSQL_USER "root" ENV MYSQL_PASSWORD "toor" ENV MYSQL_DATABASE "smsd" diff --git a/Readme.md b/Readme.md index ce8dbb7..ebfdb2a 100644 --- a/Readme.md +++ b/Readme.md @@ -57,7 +57,7 @@ services: - "db" environment: - MYSQL_HOST=db - - MYSQL_USERNAME=sms-gateway + - MYSQL_USER=sms-gateway - MYSQL_PASSWORD=Bpj7hXNCextgnzSWckFybV - MYSQL_DATABASE=smsd - GAMMU_DEVICE=/dev/phone @@ -106,7 +106,7 @@ $ docker-compose up -d default value : "localhost" description : Database server address -#### MYSQL_USERNAME +#### MYSQL_USER default value : "root" description : User name used for connection to a database diff --git a/docker-compose.yml b/docker-compose.yml index 05338ca..1f3f6a6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -24,7 +24,7 @@ services: - "db" environment: - MYSQL_HOST=db - - MYSQL_USERNAME=sms-gateway + - MYSQL_USER=sms-gateway - MYSQL_PASSWORD=Bpj7hXNCextgnzSWckFybV - MYSQL_DATABASE=smsd - GAMMU_DEVICE=/dev/phone diff --git a/entrypoint.sh b/entrypoint.sh index fd61760..6295ed9 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -21,7 +21,7 @@ PIN = ${GAMMU_PIN} Service = sql Driver = native_mysql Host = ${MYSQL_HOST} -User = ${MYSQL_USERNAME} +User = ${MYSQL_USER} Password = ${MYSQL_PASSWORD} Database = ${MYSQL_DATABASE} diff --git a/src/environment/instance.py b/src/environment/instance.py index cd80c73..11cd7f7 100644 --- a/src/environment/instance.py +++ b/src/environment/instance.py @@ -43,13 +43,13 @@ # DB config mysql_host = os.environ.get("MYSQL_HOST", "localhost") -mysql_username = os.environ.get("MYSQL_USERNAME", "root") +mysql_user = os.environ.get("MYSQL_USER", "root") mysql_password = os.environ.get("MYSQL_PASSWORD", "toor") mysql_database = os.environ.get("MYSQL_DATABASE", "smsd") database_config = { "host": mysql_host, - "username": mysql_username, + "username": mysql_user, "password": mysql_password, "database": mysql_database }