Releases: OpenShock/API
3.6.0
What's Changed
- Clean up header and cookie handling + change logout endpoint by @hhvrc in #129
- Attribute and response simplification by @hhvrc in #130
- build(deps): Bump the nuget-dependencies group with 6 updates by @dependabot in #131
- Bump to .NET9 by @hhvrc in #132
- Preperations for V2 Hub endpoint
Full Changelog: 3.5.1...3.6.0
3.5.1
OpenShock API
OpenShock backend
API Documentation
You can access our Open API Doc here:
https://api.openshock.app/swagger
Configuration
The API can be configured using the following environment variables:
Preferred way is a .env file.
Variable | Required | Default value | Allowed / Example value |
---|---|---|---|
OPENSHOCK__DB__CONN |
x | Host=postgres-server-host;Port=5432;Database=openshock;Username=openshock;Password=superSecurePassword |
|
OPENSHOCK__DB__SKIPMIGRATION |
false |
true , false |
|
OPENSHOCK__DB__DEBUG |
false |
true , false |
|
OPENSHOCK__FRONTEND__BASEURL |
x | https://my-openshock-instance.net or https://shocklink.net |
|
OPENSHOCK__FRONTEND__SHORTURL |
x | https://myoi.net or https://shockl.ink |
|
OPENSHOCK__FRONTEND__COOKIEDOMAIN |
x | my-openshock-instance.net |
|
OPENSHOCK__REDIS__CONN |
x | redis-server-host:6379 |
|
OPENSHOCK__MAIL__SENDER__EMAIL |
x | [email protected] |
|
OPENSHOCK__MAIL__SENDER__NAME |
x | MyOpenShockInstance System |
|
OPENSHOCK__MAIL__TYPE |
x | MAILJET , SMTP |
|
OPENSHOCK__TURNSTILE__ENABLE |
x | true , false |
|
OPENSHOCK__LCG__FQDN |
x | de1-gateway.my-openshock-instance.net de1-gateway.shocklink.net |
|
OPENSHOCK__LCG__COUNTRYCODE |
x | DE |
Reffer to the Npgsql Connection String documentation page for details about OPENSHOCK__DB_CONN
.
Reffer to StackExchange.Redis Configuration documention page for details about OPENSHOCK__REDIS__CONN
.
Turnstile
When Turnstile enable is set to true
, the following environment variable is required:
Variable | Required | Default value | Allowed / Example value |
---|---|---|---|
OPENSHOCK__TURNSTILE__SITEKEY |
x | ||
OPENSHOCK__TURNSTILE__SECRETKEY |
x |
MAILJET
You need these environment variables to use Mailjet:
Variable | Required | Default value | Allowed / Example value |
---|---|---|---|
OPENSHOCK__MAIL__MAILJET__KEY |
x | ||
OPENSHOCK__MAIL__MAILJET__SECRET |
x | ||
OPENSHOCK__MAIL__MAILJET__TEMPLATE__PASSWORDRESET |
x |
SMTP
You need these environment variables to use SMTP:
Variable | Required | Default value | Allowed / Example value |
---|---|---|---|
OPENSHOCK__MAIL__SMTP__HOST |
x | mail.my-openshock-instance.net |
|
OPENSHOCK__MAIL__SMTP__PORT |
587 |
587 |
|
OPENSHOCK__MAIL__SMTP__USERNAME |
x | [email protected] |
|
OPENSHOCK__MAIL__SMTP__PASSWORD |
x | superSecurePassword |
|
OPENSHOCK__MAIL__SMTP__ENABLESSL |
true |
true or false |
|
OPENSHOCK__MAIL__SMTP__VERIFYCERTIFICATE |
true |
true or false |
Deployment / Self Hosting
The OpenShock stack consists of the following components:
- Postgres as database
- Redis-Stack (with keyspace events KEA)
- The API (container, API)
- One or multiple gateways (container, LCG)
- One or multiple cron daemons (container, CRON)
- The WebUI
Requirements
OpenShock instance needs to be under the same domain name to work correctly. This is due to cookie limitations in
browsers.
E.g.
Fontend: https://openshock.app
API: https://api.openshock.app
LCG: https://de1-gateway.openshock.app
Using Docker (provided docker-compose.yml)
- Grab the
docker-compose.yml
and.env
file from the repository - Change the values in the
.env
file - Adjust traefik to your needs (e.g. add SSL certificates)
Run with docker compose up -d
You could also bring your own reverse proxy.
You would need to remove traefik from the docker-compose.yml
and route the traffic in your reverse proxy.
Support development!
You can support the OpenShock Dev Team here: Sponsor OpenShock
3.5.0
3.5.0
What's Changed
- build(deps): Bump the nuget-dependencies group with 2 updates by @dependabot in #119
- Added session related endpoints
- Sessions now auto expand
- Minor refactor and fixes to geo location logic
Full Changelog: 3.4.0...3.5.0
3.4.0
- Fixed an error with lcg assignment when not running behind cloudflare
3.3.3
What's Changed
- Code cleanup by @hhvrc in #113
- Clean up and optimize lcg assignment utilities by @hhvrc in #115
- Fetch Cloudflare IPs on startup by @hhvrc in #114
- Add tests by @hhvrc in #116
- build(deps): Bump the nuget-dependencies group with 7 updates by @dependabot in #117
Full Changelog: 3.3.2...3.3.3
3.3.2
What's Changed
- build(deps): Bump the nuget-dependencies group with 8 updates by @dependabot in #112
Full Changelog: 3.3.1...3.3.2
3.3.1
Full Changelog: 3.3.0...3.3.1
3.3.0
- Added
OPENSHOCK__REDIS__CONN
as an environment variable which should now be used to configure redis. The older redis env vars are now considered depreacted. For exampleOPENSHOCK__REDIS__CONN=redis:6379
Full Changelog: 3.2.1...3.3.0
3.2.1
What's Changed
- build(deps): Bump the nuget-dependencies group with 5 updates by @dependabot in #105
- build(deps): Bump StackExchange.Redis from 2.8.0 to 2.8.12 in the nuget-dependencies group by @dependabot in #106
- Update docker-compose for simpler install by @noideaman in #97
- build(deps): Bump StackExchange.Redis from 2.8.12 to 2.8.16 in the nuget-dependencies group by @dependabot in #107
- Add support to register cron jobs via attributes by @hhvrc in #108
- Add old password reset request clean cron-job by @hhvrc in #109
- Added Helm chart by @izzy-anon in #110
- Added arm64 as build arch
New Contributors
- @noideaman made their first contribution in #97
- @izzy-anon made their first contribution in #110
Full Changelog: 3.2.0...3.2.1
3.2.0
What's Changed
- Update README.md by @LucHeart in #99
- build(deps): Bump docker/build-push-action from 5 to 6 by @dependabot in #93
- Add swagger link to readme by @LostQuasar in #87
- build(deps): Bump the nuget-dependencies group across 1 directory with 17 updates by @dependabot in #103
- Yeet legacy endpoint by @hhvrc in #104
New Contributors
- @LostQuasar made their first contribution in #87
Full Changelog: 3.1.0...3.2.0