Skip to content

Commit

Permalink
All the db credentials are loaded by env variables.
Browse files Browse the repository at this point in the history
  • Loading branch information
KFilippopolitis committed Sep 19, 2023
1 parent 67db177 commit 2a7099b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions mipdb/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ def __init__(self, *args, **kwargs):
option_to_env_var = {
"--ip": os.getenv("DB_IP"),
"--port": os.getenv("DB_PORT"),
"--username": os.getenv("DB_USERNAME"),
"--password": os.getenv("DB_PASSWORD"),
"--username": os.getenv("MONETDB_ADMIN_USERNAME"),
"--password": os.getenv("MONETDB_LOCAL_PASSWORD"),
"--db_name": os.getenv("DB_NAME"),
}
option = args[0][0]
Expand Down
7 changes: 4 additions & 3 deletions mipdb/tables.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
from abc import ABC, abstractmethod
import json
from enum import Enum
Expand All @@ -18,9 +19,9 @@


class User(Enum):
executor = "executor"
admin = "admin"
guest = "guest"
executor = os.getenv('MONETDB_LOCAL_USERNAME', 'executor')
admin = os.getenv('MONETDB_ADMIN_USERNAME','admin')
guest = os.getenv('MONETDB_PUBLIC_USERNAME','guest')


@compiles(sql.types.JSON, "monetdb")
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "mipdb"
version = "2.2.0"
version = "2.3.0"
description = ""
authors = ["Your Name <[email protected]>"]

Expand Down

0 comments on commit 2a7099b

Please sign in to comment.