fix: resolve .env.local not loading in docker compose
Fixes issue #1827 where Docker Compose wasn't properly loading .env.local file. Problem: - Docker Compose expects .env file for variable substitution but docs say to use .env.local - This caused environment variables to not be loaded in Docker containers Solution: - Updated docker-compose.yaml to load both .env and .env.local files - Created setup-env.sh script to help users sync .env.local to .env - Updated documentation with clear instructions for Docker users - Maintains backward compatibility with existing setups Changes: - Modified docker-compose.yaml to use array syntax for env_file - Added scripts/setup-env.sh helper script - Updated CONTRIBUTING.md and index.md documentation This ensures environment variables work correctly in Docker while maintaining the security best practice of using .env.local for sensitive data. Contributed by: Keoma Wright
This commit is contained in:
@@ -7,7 +7,9 @@ services:
|
||||
target: bolt-ai-production
|
||||
ports:
|
||||
- '5173:5173'
|
||||
env_file: '.env.local'
|
||||
env_file:
|
||||
- '.env'
|
||||
- '.env.local'
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- COMPOSE_PROFILES=production
|
||||
@@ -37,7 +39,9 @@ services:
|
||||
image: bolt-ai:development
|
||||
build:
|
||||
target: bolt-ai-development
|
||||
env_file: '.env.local'
|
||||
env_file:
|
||||
- '.env'
|
||||
- '.env.local'
|
||||
environment:
|
||||
- NODE_ENV=development
|
||||
- VITE_HMR_PROTOCOL=ws
|
||||
|
||||
Reference in New Issue
Block a user