Skip to content

Removed environment variables and added docker secrets for more security#20

Open
MauritzFunke wants to merge 1 commit intokaitallaoua:masterfrom
MauritzFunke:master
Open

Removed environment variables and added docker secrets for more security#20
MauritzFunke wants to merge 1 commit intokaitallaoua:masterfrom
MauritzFunke:master

Conversation

@MauritzFunke
Copy link

No description provided.

_PASSWORD = os.environ.get("PASSWORD", None)
_USERNAME = None
_PASSWORD = None
with open("/run/secrets/spotify_login") as login:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick but can you use pathlib for this purpose. something like json.loads(Path('path/filename').read_text()

Copy link
Owner

@kaitallaoua kaitallaoua left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool. I still have to test but I like the idea. Only other nitpick is can the json file be called login.json. Its not really a configuration file at present.

@kaitallaoua
Copy link
Owner

Also this currently breaks running the program without docker, as it always tries to load the login file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants