Skip to content

Commit

Permalink
refactor: use env_file for Docker environment vars
Browse files Browse the repository at this point in the history
Update README.md and docker-compose.yml to use env_file instead of
inline environment variables. This improves security and
configuration management by centralizing environment variables in
a separate .env file.
  • Loading branch information
rtuszik committed Aug 25, 2024
1 parent c4519a7 commit f250516
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
21 changes: 10 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,16 @@ Docker is the recommended way to run this application. It ensures consistent env
### Docker Compose Setup
1. Create a `docker-compose.yml` file with the following content:
```yaml
services:
replicate-flux-lora:
image: ghcr.io/rtuszik/replicate-flux-lora:latest
container_name: replicate-flux-lora
environment:
- REPLICATE_API_TOKEN=${REPLICATE_API_TOKEN}
ports:
- "8080:8080"
volumes:
- ${HOST_OUTPUT_DIR}:/app/output
restart: unless-stopped
services:
replicate-flux-lora:
image: ghcr.io/rtuszik/replicate-flux-lora:latest
container_name: replicate-flux-lora
env_file: .env
ports:
- "8080:8080"
volumes:
- ${HOST_OUTPUT_DIR}:/app/output
restart: unless-stopped
```
2. Create a `.env` file in the same directory with the following content:
Expand Down
3 changes: 1 addition & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ services:
replicate-flux-lora:
image: ghcr.io/rtuszik/replicate-flux-lora:latest
container_name: replicate-flux-lora
environment:
- REPLICATE_API_TOKEN=${REPLICATE_API_TOKEN}
env_file: .env
ports:
- "8080:8080"
volumes:
Expand Down

0 comments on commit f250516

Please sign in to comment.