chore: make .env optional and comment out all example settings
- load .env in compose only when it exists; every setting has a default - comment out every setting in .env.example, with ## for descriptions and # VAR=default for settings to uncomment - update README, development docs and CLAUDE.md accordingly
This commit is contained in:
1 parent
b0f2c72b5f
commit
a6d468bd2c
5 files changed
+37
-29
No files matched your search
+30
-25
@@ -1,30 +1,35 @@
|
|||||||
NODE_ENV=development
|
## Optional overrides: copy to .env and uncomment the settings you need.
|
||||||
PORT=3000
|
## Every setting has a default (shown below), so liqa runs without a .env file.
|
||||||
|
##
|
||||||
|
## Lines starting with "##" are descriptions.
|
||||||
|
## Lines starting with "# " are settings: remove the "# " to enable one.
|
||||||
|
|
||||||
# SQLite database path
|
# NODE_ENV=development
|
||||||
DB_PATH=data/liqa.db
|
# PORT=3000
|
||||||
|
|
||||||
# Stored scenario files and run artifacts (downloads, failure dumps, traces)
|
## SQLite database path
|
||||||
FILES_DIR=data/files
|
# DB_PATH=data/liqa.db
|
||||||
# Days to keep run artifacts before they are deleted
|
|
||||||
FILE_RUN_EXPIRATION_DAYS=7
|
|
||||||
# When expired files are deleted (cron expression)
|
|
||||||
FILE_CLEANUP_CRON=0 3 * * *
|
|
||||||
|
|
||||||
# Chromium binary to use instead of Playwright's own (not needed in Docker,
|
## Stored scenario files and run artifacts (downloads, failure dumps, traces)
|
||||||
# which ships Playwright's chromium-headless-shell)
|
# FILES_DIR=data/files
|
||||||
|
## Days to keep run artifacts before they are deleted
|
||||||
|
# FILE_RUN_EXPIRATION_DAYS=7
|
||||||
|
## When expired files are deleted (cron expression)
|
||||||
|
# FILE_CLEANUP_CRON=0 3 * * *
|
||||||
|
|
||||||
|
## Close open sessions that have been idle for longer than this many minutes
|
||||||
|
# SESSION_IDLE_TIMEOUT_MINUTES=30
|
||||||
|
## Delete closed sessions whose updatedAt is older than this many days
|
||||||
|
# SESSION_DELETE_CLOSED_DAYS=7
|
||||||
|
|
||||||
|
## Playwright trace recording for scenario runs: on | retain-on-failure | off
|
||||||
|
## (traces often reach ~10 MB per run; can be overridden per run in the run modal)
|
||||||
|
# PLAYWRIGHT_TRACE_MODE=off
|
||||||
|
|
||||||
|
## Chromium binary to use instead of Playwright's own (not needed in Docker,
|
||||||
|
## which ships Playwright's chromium-headless-shell)
|
||||||
# PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH=/usr/bin/chromium
|
# PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH=/usr/bin/chromium
|
||||||
|
|
||||||
# Session lifecycle
|
## Directory with the built client to serve at / (the Docker image sets it to
|
||||||
# Close open sessions that have been idle for longer than this many minutes
|
## "client"; leave unset to not serve the UI, e.g. when using the Vite dev server)
|
||||||
SESSION_IDLE_TIMEOUT_MINUTES=30
|
# CLIENT_DIR=client
|
||||||
# Delete closed sessions whose updatedAt is older than this many days
|
|
||||||
SESSION_DELETE_CLOSED_DAYS=7
|
|
||||||
|
|
||||||
# Playwright trace recording for scenario runs: on | retain-on-failure | off
|
|
||||||
# (traces often reach ~10 MB per run; can be overridden per run in the run modal)
|
|
||||||
PLAYWRIGHT_TRACE_MODE=off
|
|
||||||
|
|
||||||
# Directory with the built client to serve at / (set to "client" in the Docker image;
|
|
||||||
# leave empty to not serve the UI, e.g. when using the Vite dev server)
|
|
||||||
# CLIENT_DIR=
|
|
||||||
@@ -20,7 +20,7 @@ It is an npm workspace with two packages:
|
|||||||
|
|
||||||
## Default deployment (docker compose)
|
## Default deployment (docker compose)
|
||||||
|
|
||||||
`compose.yaml` at the repo root runs a single `liqa` container, built from the root `Dockerfile`, at http://localhost:13000. The server serves everything: the UI at `/` (the built client, via `CLIENT_DIR`), the REST API at `/api/v1`, MCP at `/mcp`, Swagger at `/docs`. It reads `.env` and mounts `./data` (SQLite DB `data/liqa.db` + stored files).
|
`compose.yaml` at the repo root runs a single `liqa` container, built from the root `Dockerfile`, at http://localhost:13000. The server serves everything: the UI at `/` (the built client, via `CLIENT_DIR`), the REST API at `/api/v1`, MCP at `/mcp`, Swagger at `/docs`. It reads `.env` if present (optional - every setting has a default) and mounts `./data` (SQLite DB `data/liqa.db` + stored files).
|
||||||
|
|
||||||
Rebuild and restart: `docker compose up -d --build`. Check with `docker compose ps`, `curl localhost:13000/health` and `docker compose logs liqa`.
|
Rebuild and restart: `docker compose up -d --build`. Check with `docker compose ps`, `curl localhost:13000/health` and `docker compose logs liqa`.
|
||||||
|
|
||||||
|
|||||||
@@ -7,10 +7,11 @@ A browser automation and QA service for web applications. It stores multi-step b
|
|||||||
## Quick start
|
## Quick start
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cp .env.example .env
|
|
||||||
docker compose up -d --build
|
docker compose up -d --build
|
||||||
```
|
```
|
||||||
|
|
||||||
|
No configuration is needed: every setting has a default. To override one, copy `.env.example` to `.env` and uncomment it.
|
||||||
|
|
||||||
Everything is served from one container at **http://localhost:13000**: the UI at `/`, the REST API at `/api/v1`, MCP at `/mcp`, Swagger at `/docs`. Data is kept in `./data/`.
|
Everything is served from one container at **http://localhost:13000**: the UI at `/`, the REST API at `/api/v1`, MCP at `/mcp`, Swagger at `/docs`. Data is kept in `./data/`.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|||||||
+3
-1
@@ -5,8 +5,10 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
# UI, REST API (/api/v1), MCP (/mcp) and Swagger (/docs)
|
# UI, REST API (/api/v1), MCP (/mcp) and Swagger (/docs)
|
||||||
- "13000:3000"
|
- "13000:3000"
|
||||||
|
# Optional overrides (see .env.example); every setting has a default
|
||||||
env_file:
|
env_file:
|
||||||
- .env
|
- path: .env
|
||||||
|
required: false
|
||||||
volumes:
|
volumes:
|
||||||
# persist SQLite database across restarts
|
# persist SQLite database across restarts
|
||||||
- ./data:/app/data
|
- ./data:/app/data
|
||||||
|
|||||||
+1
-1
@@ -19,7 +19,7 @@ npm install
|
|||||||
npx playwright install --only-shell chromium # first time only: headless Chromium for the server
|
npx playwright install --only-shell chromium # first time only: headless Chromium for the server
|
||||||
```
|
```
|
||||||
|
|
||||||
Copy `.env.example` to `.env` and fill in the required values before running.
|
No `.env` is needed: every setting below has a default. To override settings, copy `.env.example` to `.env` and uncomment the ones you need. Docker Compose loads `.env` when it exists.
|
||||||
|
|
||||||
### Environment variables (server)
|
### Environment variables (server)
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user