Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for custom DotEnv file #1113

Merged

Conversation

Sebbo94BY
Copy link
Contributor

@Sebbo94BY Sebbo94BY commented Oct 9, 2021

This merge request will...

  • add support for a customizable .env file
  • add .env.custom to .gitignore, so that Git will ignore changes regarding this file
  • add a note regarding the customizable .env.custom file to the readme

Motivation:
The .envfile provides environment specific configurations, which can be always different at each installation. Docker uses by default the .env file. Using the parameter --env-file [1], you can define a custom file.

Usually, you want to have your installation clean, so Git should not report any unstaged / uncommitted changes, when you change environment specific settings and run git status.

Since the .env file is currenlty in Git, we need a custom file, which is not in Git.

Refs:

Copy link
Collaborator

@BYK BYK left a comment

Choose a reason for hiding this comment

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

Thanks a lot! Just pushing back for keeping the simplicity of the default case.

@@ -18,7 +18,7 @@ else
echo ""
echo "You're all done! Run the following command to get Sentry running:"
echo ""
echo " docker-compose up -d"
echo " docker-compose --env-file ${_ENV} up -d"
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should not show the --env-file option if we are using the default .env file as that would be quite confusing.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think you can benefit from the changes in #1116

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've changed this.

@@ -12,6 +12,16 @@ Official bootstrap for running your own [Sentry](https://sentry.io/) with [Docke

## Setup

### Customize DotEnv (.env) file
Copy link
Collaborator

Choose a reason for hiding this comment

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

We may want to lift this part up into https://develop.sentry.dev/self-hosted/#configuration

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point. But I guess it makes sense to leave this information here as well.

I've created a pull request for the documentation change: getsentry/develop#460

@github-actions
Copy link

github-actions bot commented Nov 5, 2021

This pull request has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@Sebbo94BY
Copy link
Contributor Author

Sorry for the delay. I'll take a look at it by latest next week.

@Sebbo94BY Sebbo94BY force-pushed the Add-support-for-custom-env-file branch from 9b8792b to 9240b3f Compare November 23, 2021 22:06
@Sebbo94BY
Copy link
Contributor Author

@chadwhitacre I've rebased this to solve the file conflicts.

Do you have any news regarding this change?

@chadwhitacre
Copy link
Member

Thanks for topping this up @Sebi94nbg, let me try to get to this here ...

@chadwhitacre chadwhitacre enabled auto-merge (squash) November 23, 2021 22:33
@chadwhitacre
Copy link
Member

Looks good, thanks for seeing this through @Sebi94nbg!

Setting this to automerge, once this lands I'll follow up with getsentry/develop#460. 👍

@chadwhitacre chadwhitacre merged commit 26a12a0 into getsentry:master Nov 23, 2021
chadwhitacre pushed a commit to getsentry/develop that referenced this pull request Nov 29, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Dec 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants