Update README.md
This commit is contained in:
parent
c17ad9740e
commit
e56ab24ccd
54
README.md
54
README.md
|
@ -1,39 +1,39 @@
|
||||||
<!-- #build1 -->
|
Based on the structure of the provided README example, here's how you can communicate the usage of the Docker container for compiling QMK firmware with Docker Compose, incorporating environment variables for dynamic behavior:
|
||||||
# bench plugin
|
|
||||||
|
# QMK Firmware Compiler
|
||||||
|
|
||||||
|
Compile your QMK firmware easily with Docker. This setup allows you to compile firmware from a directory of source files at runtime, ensuring flexibility for various keyboard and keymap compilations.
|
||||||
|
|
||||||
## Docker Run
|
## Docker Run
|
||||||
|
|
||||||
Run the Docker image using the `docker run` command, now including the `CMS_TYPE` environment variable for CMS-specific authentication:
|
To compile your QMK firmware using the `docker run` command, set up your environment by specifying the source directory and output path:
|
||||||
|
|
||||||
1. **Testing a Single URL with Concrete5 Authentication:**
|
1. **Compile Firmware from a Single Source Directory:**
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker run -e CMS_TYPE="Concrete5" -e URLS="http://example.com" -e USERNAME="user" -e PASSWORD="pass" git.nixc.us/colin/bench:production
|
docker run -v $(pwd)/data:/usr/src/app/data -v $(pwd)/bin:/usr/src/app/bin qmk-compiler
|
||||||
```
|
```
|
||||||
|
|
||||||
2. **Testing Multiple URLs with Concrete5 Authentication:**
|
This command mounts your local `data` directory containing the QMK source files to the container's `/usr/src/app/data` directory and outputs the compiled firmware to your local `bin` directory.
|
||||||
|
|
||||||
```bash
|
## Docker Compose
|
||||||
docker run -e CMS_TYPE="Concrete5" -e URLS="http://example.com,http://example2.com" -e USERNAME="user" -e PASSWORD="pass" git.nixc.us/colin/bench:production
|
|
||||||
```
|
|
||||||
|
|
||||||
### Docker Compose
|
To integrate this process with Docker Compose, you can define a service in your `docker-compose.yml` file. This approach allows you to specify volume mounts and environment variables for a more automated and repeatable compilation process.
|
||||||
|
|
||||||
Example `docker-compose.yml` file, now with `CMS_TYPE` to specify the CMS for authentication:
|
Example `docker-compose.yml` file for QMK firmware compilation:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
version: '3'
|
version: '3'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
apachebench:
|
qmk-compiler:
|
||||||
image: git.nixc.us/colin/bench:production
|
image: qmk-compiler
|
||||||
|
volumes:
|
||||||
|
- ./data:/usr/src/app/data # Mount the source directory
|
||||||
|
- ./bin:/usr/src/app/bin # Mount the output directory
|
||||||
environment:
|
environment:
|
||||||
CMS_TYPE: "Concrete5" # Specify CMS type for authentication
|
- KEYBOARD=example_keyboard # Specify the keyboard name (optional)
|
||||||
URLS: "http://example.com,http://example2.com" # Comma-separated list of URLs
|
- KEYMAP=default # Specify the keymap name (optional)
|
||||||
USERNAME: "user" # Basic auth username
|
|
||||||
PASSWORD: "pass" # Basic auth password
|
|
||||||
REQUESTS: 100 # Number of requests for Apache Bench
|
|
||||||
CONCURRENCY: 10 # Number of multiple requests to make at a time
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Run the service defined in the `docker-compose.yml` file with:
|
Run the service defined in the `docker-compose.yml` file with:
|
||||||
|
@ -44,10 +44,14 @@ docker-compose up
|
||||||
|
|
||||||
## Customizing the Configuration
|
## Customizing the Configuration
|
||||||
|
|
||||||
To fine-tune your testing setup, adjust the following environment variables:
|
To customize your firmware compilation, you can adjust the following environment variables and volume mounts:
|
||||||
|
|
||||||
- `CMS_TYPE`: Specify the CMS type for CMS-specific authentication (e.g., "Concrete5").
|
- **Volumes:**
|
||||||
- `URLS`: Comma-separated list of URLs to test.
|
- Mount your source directory to `/usr/src/app/data` to provide the firmware source files.
|
||||||
- `USERNAME` and `PASSWORD`: Credentials for HTTP Basic Authentication.
|
- Mount your output directory to `/usr/src/app/bin` to retrieve the compiled firmware.
|
||||||
- `REQUESTS`: Number of requests to perform with Apache Bench.
|
|
||||||
- `CONCURRENCY`: Number of multiple requests to make at a time.
|
- **Environment Variables (Optional):**
|
||||||
|
- `KEYBOARD`: Specify the keyboard for which the firmware is being compiled. This variable can be used in your `compile_firmware.sh` script to dynamically select the keyboard.
|
||||||
|
- `KEYMAP`: Specify the keymap to be compiled. Similar to `KEYBOARD`, this can be used in the script to select the appropriate keymap.
|
||||||
|
|
||||||
|
This configuration allows for a highly flexible and repeatable process for compiling QMK firmware, accommodating various keyboards and keymaps by simply adjusting the mounted volumes and, optionally, setting environment variables for specific compilations.
|
Loading…
Reference in New Issue