-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
25 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |