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:
@@ -95,11 +95,20 @@ Interested in maintaining and growing the project? Fill out our [Contributor App
|
||||
OPENAI_API_KEY=XXX
|
||||
...
|
||||
```
|
||||
3. Optionally set:
|
||||
3. **For Docker users**: Run the setup script or manually copy `.env.local` to `.env`:
|
||||
```bash
|
||||
# Option 1: Use the setup script
|
||||
./scripts/setup-env.sh
|
||||
|
||||
# Option 2: Manual copy
|
||||
cp .env.local .env
|
||||
```
|
||||
Docker Compose requires `.env` for variable substitution.
|
||||
4. Optionally set:
|
||||
- Debug level: `VITE_LOG_LEVEL=debug`
|
||||
- Context size: `DEFAULT_NUM_CTX=32768`
|
||||
|
||||
**Note**: Never commit your `.env.local` file to version control. It’s already in `.gitignore`.
|
||||
**Note**: Never commit your `.env.local` or `.env` files to version control. They're already in `.gitignore`.
|
||||
|
||||
### 2️⃣ Run Development Server
|
||||
|
||||
|
||||
Reference in New Issue
Block a user