Skip to content

Conversation

@saqqaf
Copy link

@saqqaf saqqaf commented Aug 14, 2024

changes to dockerfile and docker compose

environment:
SPRING_DATASOURCE_URL: jdbc:mysql://mysql:3307/usersystem?useSSL=false&serverTimezone=UTC&createDatabaseIfNotExist=true&allowPublicKeyRetrieval=true
SPRING_DATASOURCE_USERNAME: root
SPRING_DATASOURCE_PASSWORD: root
Copy link
Owner

Choose a reason for hiding this comment

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

Defining a password here might be fine, since MySQL container runs locally with dummy data. However, in a docker-compose files, the DB URL might be pointing to a cloud database and its better to pick up the password from a .env file (In any case as a best practice) so it doesn't appear on any public repo.
Here we can include a comment, telling the user to define a .env file with their choice of values and put that in .gitignore

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