Skip to content

Commit 7b53257

Browse files
Fix docker-compose to load all env vars from .env file
- Change from explicit environment vars to env_file: .env - This ensures OIDC_ENABLED and all OIDC provider settings are loaded - Update README to show env_file approach 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent 365fac1 commit 7b53257

File tree

2 files changed

+24
-23
lines changed

2 files changed

+24
-23
lines changed

README.md

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -36,22 +36,28 @@ services:
3636
restart: unless-stopped
3737
ports:
3838
- "4123:4123"
39-
environment:
40-
- SECRET_KEY=CHANGE_ME_TO_A_RANDOM_64_CHARACTER_STRING
41-
- FLASK_ENV=production
39+
env_file:
40+
- .env
4241
volumes:
4342
- ./data:/app/data
4443
```
4544
46-
### Step 2: Generate a Secret Key
45+
### Step 2: Create .env file
4746
48-
Run this command and copy the output:
47+
Create a `.env` file with your configuration:
48+
49+
```env
50+
SECRET_KEY=CHANGE_ME_TO_A_RANDOM_64_CHARACTER_STRING
51+
FLASK_ENV=production
52+
```
53+
54+
Generate a secret key:
4955

5056
```bash
5157
docker run --rm python:3.11-slim python -c 'import secrets; print(secrets.token_hex(32))'
5258
```
5359

54-
Edit your `docker-compose.yml` and replace `CHANGE_ME_TO_A_RANDOM_64_CHARACTER_STRING` with the generated key.
60+
Replace `CHANGE_ME_TO_A_RANDOM_64_CHARACTER_STRING` with the generated key.
5561

5662
### Step 3: Start the Application
5763

@@ -87,19 +93,17 @@ docker-compose pull && docker-compose up -d
8793

8894
## Optional Configuration
8995

90-
Add these environment variables to enable additional features:
96+
Add these to your `.env` file to enable additional features:
9197

92-
```yaml
93-
environment:
94-
- SECRET_KEY=your-64-character-secret-key
95-
- FLASK_ENV=production
96-
# Change the port (default: 4123)
97-
- PORT=8080
98-
# Enable OIDC/SSO authentication
99-
- OIDC_ENABLED=true
100-
- APP_URL=https://your-domain.com
101-
- GOOGLE_CLIENT_ID=your-client-id
102-
- GOOGLE_CLIENT_SECRET=your-client-secret
98+
```env
99+
# Change the port (default: 4123)
100+
PORT=8080
101+
102+
# Enable OIDC/SSO authentication
103+
OIDC_ENABLED=true
104+
APP_URL=https://your-domain.com
105+
GOOGLE_CLIENT_ID=your-client-id
106+
GOOGLE_CLIENT_SECRET=your-client-secret
103107
```
104108

105109
---

docker-compose.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,8 @@ services:
99
restart: unless-stopped
1010
ports:
1111
- "0.0.0.0:${PORT:-4123}:4123"
12-
environment:
13-
- SECRET_KEY=${SECRET_KEY}
14-
- FLASK_ENV=${FLASK_ENV:-production}
15-
- PORT=${PORT:-4123}
16-
- HOST=0.0.0.0
12+
env_file:
13+
- .env
1714
volumes:
1815
- ${DATA_PATH:-./data}:/app/data
1916
healthcheck:

0 commit comments

Comments
 (0)