Skip to content

Commit 983c084

Browse files
committed
additioning configs for docker
1 parent 0bd5b6b commit 983c084

3 files changed

Lines changed: 15 additions & 2 deletions

File tree

.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ HOST=127.0.0.1
33
DB_PATH=./db/cronpilot.db
44
EXEC_TIMEOUT_MS=1800000
55
KEEP_MAX_FOR_HISTORY=5
6+
LOG_LEVEL=info

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,14 @@ docker compose up -d
4949

5050
The database is stored in the `/data` volume. Open [http://localhost:3001](http://localhost:3001) in your browser.
5151

52+
### Configuration
53+
54+
To configure Docker, create a `.env` file next to `docker-compose.yml`:
55+
56+
Copy the .env.example.
57+
58+
Docker Compose automatically reads this file. `HOST` and `DB_PATH` are fixed inside the container and cannot be overridden.
59+
5260
---
5361

5462
## Prerequisites
@@ -89,6 +97,7 @@ Available options:
8997
| `DB_PATH` | `./cronpilot.db` | Path to the SQLite database file |
9098
| `EXEC_TIMEOUT_MS` | `1800000` | Max execution time per job in milliseconds (30 min) |
9199
| `KEEP_MAX_FOR_HISTORY` | `5` | Maximum run history entries kept per job; older runs are deleted automatically |
100+
| `LOG_LEVEL` | `info` | Log verbosity: `error`, `warn`, `info`, `debug` |
92101

93102
---
94103

docker-compose.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,14 @@ services:
44
image: ghcr.io/orangecoding/cronpilot:latest
55
container_name: cronpilot
66
ports:
7-
- "3001:3001"
7+
- "${PORT:-3001}:${PORT:-3001}"
88
volumes:
99
- ./db:/data
1010
environment:
11-
PORT: 3001
11+
PORT: ${PORT:-3001}
1212
HOST: 0.0.0.0
1313
DB_PATH: /data/cronpilot.db
14+
EXEC_TIMEOUT_MS: ${EXEC_TIMEOUT_MS:-1800000}
15+
KEEP_MAX_FOR_HISTORY: ${KEEP_MAX_FOR_HISTORY:-5}
16+
LOG_LEVEL: ${LOG_LEVEL:-info}
1417
restart: unless-stopped

0 commit comments

Comments
 (0)