docker / awesome-compose

Awesome Docker Compose samples
https://docs.docker.com/compose/
Creative Commons Zero v1.0 Universal
34.57k stars 6.64k forks source link

ngnix-flask-mysql: when reading password secret file, should strip after read #329

Open louking opened 1 year ago

louking commented 1 year ago

Suggest adding .strip() after .read() at https://github.com/docker/awesome-compose/blob/e6b1d2755f2f72a363fc346e52dce10cace846c8/nginx-flask-mysql/backend/hello.py#L11

I spent days debugging a secrets file which had an errant LF character at the end.

See also https://stackoverflow.com/a/75488788/799921