diff --git a/keyserver/docker-compose.yml b/keyserver/docker-compose.yml --- a/keyserver/docker-compose.yml +++ b/keyserver/docker-compose.yml @@ -16,10 +16,10 @@ environment: - REDIS_URL=redis://cache - COMM_LISTEN_ADDR=0.0.0.0 - - COMM_MYSQL_HOST=${COMM_MYSQL_HOST:-database} - - COMM_MYSQL_DATABASE - - COMM_MYSQL_USER - - COMM_MYSQL_PASSWORD + - COMM_DATABASE_HOST=${COMM_DATABASE_HOST:-database} + - COMM_DATABASE_DATABASE + - COMM_DATABASE_USER + - COMM_DATABASE_PASSWORD depends_on: - cache - database @@ -39,9 +39,9 @@ --innodb-buffer-pool-size=1600M environment: - MYSQL_RANDOM_ROOT_PASSWORD=yes - - MYSQL_DATABASE=$COMM_MYSQL_DATABASE - - MYSQL_USER=$COMM_MYSQL_USER - - MYSQL_PASSWORD=$COMM_MYSQL_PASSWORD + - MYSQL_DATABASE=$COMM_DATABASE_DATABASE + - MYSQL_USER=$COMM_DATABASE_USER + - MYSQL_PASSWORD=$COMM_DATABASE_PASSWORD volumes: - mysqldata:/var/lib/mysql cache: diff --git a/keyserver/src/database/db-config.js b/keyserver/src/database/db-config.js --- a/keyserver/src/database/db-config.js +++ b/keyserver/src/database/db-config.js @@ -17,15 +17,15 @@ return dbConfig; } if ( - process.env.COMM_MYSQL_DATABASE && - process.env.COMM_MYSQL_USER && - process.env.COMM_MYSQL_PASSWORD + process.env.COMM_DATABASE_DATABASE && + process.env.COMM_DATABASE_USER && + process.env.COMM_DATABASE_PASSWORD ) { dbConfig = { - host: process.env.COMM_MYSQL_HOST || 'localhost', - user: process.env.COMM_MYSQL_USER, - password: process.env.COMM_MYSQL_PASSWORD, - database: process.env.COMM_MYSQL_DATABASE, + host: process.env.COMM_DATABASE_HOST || 'localhost', + user: process.env.COMM_DATABASE_USER, + password: process.env.COMM_DATABASE_PASSWORD, + database: process.env.COMM_DATABASE_DATABASE, }; } else { const importedDBConfig = await importJSON({