match4everyone / match4healthcare

Helping hospitals find qualified medicine students (Hackathon #wirvsvirus). A more flexibel version is currently in development under match4everyone/match4everything,
https://match4healthcare.de
Other
17 stars 10 forks source link

Remove (possible) syntax error in backup.sh #539

Closed maltezacharias closed 4 years ago

maltezacharias commented 4 years ago

Topic: backup.sh sources a docker .env file. Docker .env files don't use quotes (instead quotes are included as part of the variable). Depending on the contents of docker.env file this can cause syntax errors and unexpected behaviour.

Relevant issues: none

Further description: The script sourced env files because double quotes were used and the parameters to the database backup command were expanded in the host bash instead of inside the docker container.

After switching to single quotes it is no longer necessary to source the env file. As this was error prone anyway (and causes an error message with certain parameter values) it was removed.

Alternative approaches that could be considered: Write some logic to parse the source file, as the variables are only needed to execute a command inside the container where the vars are already present this is not necessary