Skip to content

Commit

Permalink
stats-updater: Fix envs
Browse files Browse the repository at this point in the history
  • Loading branch information
bperel committed Aug 18, 2024
1 parent 17c72d0 commit 4a659ec
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion apps/stats-updater/.env
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MYSQL_HOST=127.0.0.1
MYSQL_PORT=64999
MYSQL_PASSWORD=changeme
MYSQL_ROOT_PASSWORD=changeme

MYSQL_DM_DATABASE=dm
MYSQL_DM_STATS_DATABASE=dm_stats
Expand Down
2 changes: 1 addition & 1 deletion apps/stats-updater/.env.prod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MYSQL_HOST=db
MYSQL_PORT=3306
MYSQL_PASSWORD=changeme
MYSQL_ROOT_PASSWORD=changeme

MYSQL_DM_DATABASE=dm
MYSQL_DM_STATS_DATABASE=dm_stats
Expand Down
2 changes: 1 addition & 1 deletion apps/stats-updater/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ Required environment variables :
- `DATABASE_URL_DM_STATS` : The connection string to the DM stats DB
- `MYSQL_DM_STATS_DATABASE` : The name of the DM stats DB
- `MYSQL_HOST` : The hostname of the database
- `MYSQL_PASSWORD` : The password to the database
- `MYSQL_ROOT_PASSWORD` : The password to the database
- `MYSQL_PORT` : The port to the database
4 changes: 2 additions & 2 deletions apps/stats-updater/db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ dotenv.config();
for (const envKey of [
"MYSQL_HOST",
"MYSQL_PORT",
"MYSQL_PASSWORD",
"MYSQL_ROOT_PASSWORD",
"DATABASE_URL_DM_STATS",
]) {
if (!process.env[envKey]) {
Expand All @@ -24,7 +24,7 @@ const pool = createPool({
host: process.env.MYSQL_HOST,
port: parseInt(process.env.MYSQL_PORT!),
user: "root",
password: process.env.MYSQL_PASSWORD,
password: process.env.MYSQL_ROOT_PASSWORD,
multipleStatements: true,
});

Expand Down
1 change: 0 additions & 1 deletion apps/stats-updater/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ services:
MYSQL_DM_STATS_DATABASE: dm_stats
MYSQL_HOST: db
MYSQL_PORT: 3306
MYSQL_PASSWORD: ${MYSQL_ROOT_PASSWORD}
networks:
- dm-server_db-network
- ducksmanager_dm-network
Expand Down
1 change: 0 additions & 1 deletion packages/api/docker-compose-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ services:
# - MYSQL_COA_HOST=db
# - MYSQL_COA_PORT=3306
# - MYSQL_COA_DATABASE=coa
# - MYSQL_PASSWORD=$MYSQL_ROOT_PASSWORD
# - GITHUB_TOKEN=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
# - GITHUB_NAME=Admin
# - [email protected]
Expand Down

0 comments on commit 4a659ec

Please sign in to comment.