Skip to content

added support for .env files#375

Closed
mnzaki wants to merge 2 commits intozulip:mainfrom
mnzaki:feat/env
Closed

added support for .env files#375
mnzaki wants to merge 2 commits intozulip:mainfrom
mnzaki:feat/env

Conversation

@mnzaki
Copy link
Copy Markdown

@mnzaki mnzaki commented Nov 29, 2022

This allows users to simply set values in a .env file and keep using the docker-compose.yml file as-is, so that updates are easier

@maltokyo
Copy link
Copy Markdown
Contributor

Thanks, this would be great! I have a question on this. I have to comment out the port lines for 80 and 443, as my reverse proxy handles that. Any way to do this "comment out" or cancel lines with .env?

@mnzaki
Copy link
Copy Markdown
Author

mnzaki commented Mar 27, 2023

@maltokyo one way would be to also put those ports in the .env file and change the docker-compose.yml to bind them to whatever is in .env

ports:
  - "${PUBLIC_HTTP_PORT}:80"
  - "${PUBLIC_HTTPS_PORT}:443"

Unfortunately I don't know of anyway to fully remove the port binding

Copy link
Copy Markdown

@silviot silviot left a comment

Choose a reason for hiding this comment

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

Nice! I had the same thoughts reading the README.

I think this PR should also change this paragraph of the README.

Note that I'm not affiliated with the project.

@alexmv
Copy link
Copy Markdown
Contributor

alexmv commented Feb 5, 2026

I'm closing this -- modern compose.override.yaml lets you set a env_file: ... if you'd like that.

@alexmv alexmv closed this Feb 5, 2026
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.

4 participants