niekcandaele / CSGO-RankMe-stats

Application that displays stats from the Kento RankMe plugin
33 stars 6 forks source link

Unable to start Docker container post-CI update #23

Closed grahams closed 3 years ago

grahams commented 4 years ago

Describe the bug The sequelize update bundled into the CI fix seems to have broken db connections (perhaps just on Docker). I believe it is this change to index.js

Not sure if it's the interpolation failing or if the env members are not correctly populated.

To Reproduce Steps to reproduce the behavior:

  1. Launch the app in a docker container

Expected behavior The application launches

Screenshots

info: Detected 6 available CPUs, scaling webserver to 6 processes

[...]

error: Fatal error while connecting to database SequelizeConnectionError: Access denied for user 'sourcemod'@'%' to database ':undefined/sourcemod'

Environment info:

niekcandaele commented 4 years ago

Ah crap, my bad.

https://github.com/niekcandaele/CSGO-RankMe-stats/blob/master/src/index.js#L89

Doesn't handle default port properly. Add a env var MYSQL_PORT and that should make it work again