#11 Add Secrets File #239

Merged
c24elipe merged 3 commits from #11-secrets-file-with-user-pass into team_2_week_1 2026-04-14 10:11:34 +00:00
Collaborator

Add environment variables and .env.example

Changes:

  • Replaced hardcoded credentials with environment variables
  • tempService and middleware have been updated to use Environment.GetEnvironmentVariable
  • Added .env file for environment variables and ignored it in .gitignore
  • Added .env.example file as a template required for environment variables
  • Updated docker compose so the services can use values from the .env file
Add environment variables and .env.example Changes: - Replaced hardcoded credentials with environment variables - tempService and middleware have been updated to use `Environment.GetEnvironmentVariable` - Added .env file for environment variables and ignored it in .gitignore - Added .env.example file as a template required for environment variables - Updated docker compose so the services can use values from the .env file
Collaborator

I reviewed the code in the changed files and tried running the code.

I saw no errors in the added code and it follows the set standards. The one thing was that there were no comments, but as there were no other comments in the modified files, I have no problem with this.

When running the code, I checked the docker console print outs and found no error messages. I also started the application, and data was successfully retrieved for the temperature view.

This looks good to me. However, one thing I should mention is that we should probably state somewhere how the .env file is used. It took me some time to realize that it had to be in the DockerCompose directory (it did not work for me when I had it located in the root directory of the project, which was my assumption) and I want others to avoid this mistake.

I reviewed the code in the changed files and tried running the code. I saw no errors in the added code and it follows the set standards. The one thing was that there were no comments, but as there were no other comments in the modified files, I have no problem with this. When running the code, I checked the docker console print outs and found no error messages. I also started the application, and data was successfully retrieved for the temperature view. This looks good to me. However, one thing I should mention is that we should probably state somewhere how the .env file is used. It took me some time to realize that it had to be in the DockerCompose directory (it did not work for me when I had it located in the root directory of the project, which was my assumption) and I want others to avoid this mistake.
j21marbr changed title from #11 Add Secrets File to WIP: #11 Add Secrets File 2026-04-14 07:38:43 +00:00
j21marbr changed title from WIP: #11 Add Secrets File to #11 Add Secrets File 2026-04-14 07:39:19 +00:00
Collaborator

I suggest adding default values into the .env file.

I suggest adding default values into the .env file.
Collaborator

Review

Whats done

  • Tested on Fedora 43
    • First try did not work
    • Second try worked after some modifications
      • Added .env file in dockercompose/
      • copy from .env.example
      • Gave random values to
        • DATABASE_USER=TEMP
        • DATABASE_PASSWORD=TEMPPSW

Needs to be done

  • No changes deemed necessary because .env should not be commited.
  • Perhaps add some instruction how to add .env file

Conclusion

  • The code works after some modification that can't be fixed by pushing to git.
# Review ## Whats done + Tested on Fedora 43 + First try did not work + Second try worked after some modifications + Added .env file in dockercompose/ + copy from .env.example + Gave random values to + DATABASE_USER=TEMP + DATABASE_PASSWORD=TEMPPSW ## Needs to be done + No changes deemed necessary because .env should not be commited. + Perhaps add some instruction how to add .env file ## Conclusion + The code works after some modification that can't be fixed by pushing to git.
c24elipe merged commit d80d6e4dcd into team_2_week_1 2026-04-14 10:11:34 +00:00
c24elipe deleted branch #11-secrets-file-with-user-pass 2026-04-14 10:11:34 +00:00
Collaborator

Looks good and is merged

Looks good and is merged
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Andras/BoundlessFlowCampus2K!239
No description provided.