Skip to content

Commit

Permalink
Update env variables
Browse files Browse the repository at this point in the history
  • Loading branch information
LucHeart committed Sep 23, 2023
1 parent 1292b5b commit ec1d741
Showing 1 changed file with 25 additions and 15 deletions.
40 changes: 25 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,42 +1,52 @@
# ShockLink API
ShockLink backend.

# Configuration

The API can be configured using the following environment variables:

|Variable|Example value|
|-|-|
|`DB`|`Host=docker-node;Port=1337;Database=root;Username=root;Password=root;Search Path=ShockLink`|
|`REDIS_HOST`|`redis`|
|`REDIS_PASSWORD`| |
|`CF_ACC_ID`| |
|`CF_IMG_KEY`| |
|`CF_IMG_URL`| |
|`MAILJET_KEY`| |
|`MAILJET_SECRET`| |
| Variable | Default value | Example value |
|---------------------------------------|-------------------------|----------------------------------------------------------------------------------------------|
| `SHOCKLINK__DB` | | `Host=docker-node;Port=1337;Database=root;Username=root;Password=root;Search Path=ShockLink` |
| `SHOCKLINK__FRONTENDBASEURL` | `https://shocklink.net` | `https://shocklink.net` |
| `SHOCKLINK__REDIS__HOST` | x | `redis` |
| `SHOCKLINK__REDIS__PORT` | `6379` |
| `SHOCKLINK__REDIS__USER` | |
| `SHOCKLINK__REDIS__PASSWORD` | |
| `SHOCKLINK__CLOUDFLARE__ACCOUNTID` | |
| `SHOCKLINK__CLOUDFLARE___IMAGES__KEY` | |
| `SHOCKLINK__CLOUDFLARE___IMAGES__URL` | |
| `SHOCKLINK__MAILJET__KEY` | |
| `SHOCKLINK__MAILJET__SECRET` | |

# Deployment

The ShockLink stack consists of the following components:

- Postgres as database
- Redis
- Redis
- The API (this repository)
- [The WebUI](https://github.com/Shock-Link/WebUI)

## Using Docker

Assuming you have all other required containers running (if not, see above), you can run the following command to start the API:
Assuming you have all other required containers running (if not, see above), you can run the following command to start
the API:

```bash
docker run \
ghcr.io/shock-link/api:latest \
--name shocklink-api \
-e FRONTEND_BASE_URL=localhost \
-e DB=localhost \
-e REDIS_HOST=localhost \
-e SHOCKLINK__DB=Host=docker-node;Port=1337;Database=root;Username=root;Password=root;Search Path=ShockLink \
-e SHOCKLINK__REDIS__HOST=localhost \
-e SHOCKLINK__FRONTENDBASEURL=https://myshocklink.app \
-p 80:80/tcp
```

## Using `docker-compose`

See [docker-compose.yml](docker-compose.yml).

# Current struggles
+ Dependency to Cloudflare Images (Paid)
+ Dependency with Mailjet templates

0 comments on commit ec1d741

Please sign in to comment.