updated readme
This commit is contained in:
19
README.md
19
README.md
@@ -6,7 +6,21 @@ This license server has no concept of separate devices, so use only if you don't
|
|||||||
|
|
||||||
## Environment Setup
|
## Environment Setup
|
||||||
|
|
||||||
Replace the placeholder secrets in `.env` with secure random values using `openssl rand`:
|
### 1. Clone the repository
|
||||||
|
```bash
|
||||||
|
git clone https://git.lexza.ch/Lexzach/micro-license-server.git
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
### 2. Create a new `.env` file in the cloned repository with the following contents:
|
||||||
|
```env
|
||||||
|
POSTGRESQL_PASSWORD="PG_CHANGEME"
|
||||||
|
API_KEY="API_CHANGEME"
|
||||||
|
NUM_KEY_CHUNKS=5
|
||||||
|
KEY_CHUNK_LENGTH=5
|
||||||
|
```
|
||||||
|
|
||||||
|
### 3. Replace the placeholder secrets in `.env` with secure random values using `openssl rand`:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sed -i \
|
sed -i \
|
||||||
@@ -17,6 +31,9 @@ sed -i \
|
|||||||
|
|
||||||
You can change `NUM_KEY_CHUNKS` to adjust how many chunks a license key consists of, and `KEY_CHUNK_LENGTH` to change how many characters appear in each chunk. This only changes how *new* keys are generated, so previous keys won't become invalidated.
|
You can change `NUM_KEY_CHUNKS` to adjust how many chunks a license key consists of, and `KEY_CHUNK_LENGTH` to change how many characters appear in each chunk. This only changes how *new* keys are generated, so previous keys won't become invalidated.
|
||||||
|
|
||||||
|
### 4. Run `docker-compose up -d` in the cloned repository folder to start the server.
|
||||||
|
You will then have the server exposed on port 8000, if you need a different port, change it in the docker-compose file, then run `docker-compose up -d` again.
|
||||||
|
|
||||||
## API Endpoints
|
## API Endpoints
|
||||||
|
|
||||||
All authenticated endpoints expect a `Bearer` token via the `Authorization` header that matches `API_KEY` from `.env`. Unless stated otherwise, responses are JSON.
|
All authenticated endpoints expect a `Bearer` token via the `Authorization` header that matches `API_KEY` from `.env`. Unless stated otherwise, responses are JSON.
|
||||||
|
|||||||
Reference in New Issue
Block a user