diff --git a/README.md b/README.md
index 27949b1..bf9dee3 100644
--- a/README.md
+++ b/README.md
@@ -14,6 +14,7 @@
- Jellyfin Statistics Plugin Integration
## Required Development
+
- Responsive UI
- Code Optimizations
- Security Testing
@@ -21,7 +22,25 @@
- Multi-Server support
- More to come
+## Environmental Variables
+
+| Env | Default | Example | Description |
+| ------------------------------- | ------- | ------------------------ | ------------------------------------------------------------------------------------------------------------------------------ |
+| JS_BASE_URL | / | / | Base url |
+| JS_USER | not set | User | Master Override User in case username used during setup is forgotten |
+| JS_PASSWORD | not set | Password | Master Override Password in case username used during setup is forgotten |
+| POSTGRES_USER | not set | postgres | Username that will be used in postgres database |
+| POSTGRES_PASSWORD | not set | postgres | Password that will be used in postgres database |
+| POSTGRES_DB | jfstat | jfstat | Name of postgres database |
+| POSTGRES_IP | not set | jellystat-db/192.168.0.5 | Hostname/IP of postgres instance |
+| POSTGRES_PORT | not set | 5432 | Port Postgres is running on |
+| REJECT_SELF_SIGNED_CERTIFICATES | true | false | Allow or deny self signed SSL certificates |
+| JWT_SECRET | not set | my-secret-jwt-key | JWT Key to be used to encrypt JWT tokens for authentication |
+| JS_GEOLITE_ACCOUNT_ID | not set | 123456 | maxmind.com user id to be used for Geolocating IP Addresses (Can be found at https://www.maxmind.com/en/accounts/current/edit) |
+| JS_GEOLITE_LICENSE_KEY | not set | ASDWdaSdawe2sd186 | License key you need to generate on maxmin to use their services |
+
## Getting Started with Development
+
- Clone the project from git
- set your env variables before strating the server (Variable names as per the docker compose file).
- Run `npm install` to install necessary packages
@@ -37,14 +56,17 @@ Check out our dockerhub to run Jellystat:
https://hub.docker.com/r/cyfershepard/jellystat
### Environment variables from files (Docker secrets)
+
You can set any environment variable from a file by using the prefix `FILE__`
As an example:
+
```yaml
- jellystat:
- environment:
- FILE__MYVAR: /run/secrets/MYSECRETFILE
+jellystat:
+ environment:
+ FILE__MYVAR: /run/secrets/MYSECRETFILE
```
+
Will set the environment variable `MYVAR` based on the contents of the `/run/secrets/MYSECRETFILE` file. see [docker secrets](https://docs.docker.com/compose/use-secrets/) for more info.
## Screenshots
diff --git a/backend/.env.example b/backend/.env.example
index ac2fdec..bd4efdb 100644
--- a/backend/.env.example
+++ b/backend/.env.example
@@ -6,5 +6,5 @@ POSTGRES_PORT = # your postgres port
JWT_SECRET = # ultra secret word
-VITE_GEOLITE_ACCOUNT_ID = # optional, your GeoLite account ID to show geolocation info for client IPs
-VITE_GEOLITE_LICENSE_KEY = # optional, your GeoLite account license key to show geolocation info for client IPs
\ No newline at end of file
+JS_GEOLITE_ACCOUNT_ID = # optional, your GeoLite account ID to show geolocation info for client IPs
+JS_GEOLITE_LICENSE_KEY = # optional, your GeoLite account license key to show geolocation info for client IPs
\ No newline at end of file
diff --git a/backend/routes/utils.js b/backend/routes/utils.js
index 933bf8b..685e750 100644
--- a/backend/routes/utils.js
+++ b/backend/routes/utils.js
@@ -6,8 +6,8 @@ const router = express.Router();
const geoliteUrlBase = 'https://geolite.info/geoip/v2.1/city';
-const geoliteAccountId = process.env.VITE_GEOLITE_ACCOUNT_ID;
-const geoliteLicenseKey = process.env.VITE_GEOLITE_LICENSE_KEY;
+const geoliteAccountId = process.env.JS_GEOLITE_ACCOUNT_ID;
+const geoliteLicenseKey = process.env.JS_GEOLITE_LICENSE_KEY;
//https://stackoverflow.com/a/29268025
const ipRegex = new RegExp(/\b(?!(10\.|172\.(1[6-9]|2[0-9]|3[0-1])\.|192\.168))(?:(?:2(?:[0-4][0-9]|5[0-5])|[0-1]?[0-9]?[0-9])\.){3}(?:(?:2([0-4][0-9]|5[0-5])|[0-1]?[0-9]?[0-9]))\b/);
diff --git a/src/index.jsx b/src/index.jsx
index 058942f..9c57d3e 100644
--- a/src/index.jsx
+++ b/src/index.jsx
@@ -33,7 +33,7 @@ i18n
ReactDOM.createRoot(document.getElementById("root")).render(
} />
-
+
diff --git a/src/pages/components/activity/activity-table.jsx b/src/pages/components/activity/activity-table.jsx
index cde3a30..fa8c901 100644
--- a/src/pages/components/activity/activity-table.jsx
+++ b/src/pages/components/activity/activity-table.jsx
@@ -155,8 +155,8 @@ export default function ActivityTable(props) {
row = row.original;
if (
isRemoteSession(row.RemoteEndPoint) &&
- import.meta.env.VITE_GEOLITE_ACCOUNT_ID &&
- import.meta.env.VITE_GEOLITE_LICENSE_KEY
+ import.meta.env.JS_GEOLITE_ACCOUNT_ID &&
+ import.meta.env.JS_GEOLITE_LICENSE_KEY
) {
return (
showIPDataModal(row.RemoteEndPoint)}>
diff --git a/src/pages/components/sessions/session-card.jsx b/src/pages/components/sessions/session-card.jsx
index 81a7cd2..b77e14f 100644
--- a/src/pages/components/sessions/session-card.jsx
+++ b/src/pages/components/sessions/session-card.jsx
@@ -141,7 +141,7 @@ function SessionCard(props) {