fix: Environment variable override in Docker Compose#54
Merged
avoylenko merged 6 commits intoavoylenko:mainfrom Sep 10, 2025
Merged
fix: Environment variable override in Docker Compose#54avoylenko merged 6 commits intoavoylenko:mainfrom
avoylenko merged 6 commits intoavoylenko:mainfrom
Conversation
- Move dotenv config to the top of server.js - Update docker-compose.yml to properly handle .env file - Remove duplicate environment variables section This ensures BASE_PATH and TRUST_PROXY work as expected in both Docker and local environments.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes the Docker Compose configuration to properly handle environment variables by removing the conflicting
environmentsection, ensuring that variables from the.envfile take precedence.Changes Made
environmentsection in docker-compose.yml to prevent overriding variables from.envfile. Now, environment variables from.envare properly applied.Problem Addressed
SET_MESSAGES_AS_SEENin.envwere ignored because Docker Compose'senvironmentsection has higher priority..envare respected without manual overrides in the compose file.Testing Instructions
.envfile exists with necessary variables (copy from.env.exampleif needed).docker-compose upto test the setup..envare applied correctly (e.g., message seen behavior).Related Issues
.envvariables were not being read in production.