Replies: 2 comments
-
|
I would rather see it as a regular jellyfin plugin, where we add the repository, install/activate the plugin. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
It's already possible to run jellystats without docker without too much hassle. This assumes you have a postgresql server setup with a database ready to go, this is honestly a bit harder than getting jellystats itself to run! apt install nodeenv git
# NOTE: setup a user for jellystats
useradd --system --no-create-home --shell /usr/sbin/nologin --user-group jellystats
mkdir -p /opt/jellystats
chown jellystats:jellystats /opt/jellystats
# NOTE: become the users so all the files are owned correctly
sudo -u jellystats -s bash
cd /opt/jellystats
# NOTE: grab a modern node version that is not tied to the systems node package
[ -d /opt/jellystats/nodeenv ] || nodeenv --prebuilt -n 23.11.1 /opt/jellystats/nodeenv
# NOTE: clone the source
git clone https://github.com/CyferShepard/Jellystat.git /opt/jellystats/app
# NOTE: build the source (using the nodeenv's node)
source /opt/jellystats/nodeenv/bin/activate
cd /opt/jellystats/app
npm install
npm run build
# NOTE: create a env file for our configuration
mkdir -p /opt/jellystats/etc
cat > /opt/jellystats/etc/config.env << EOF
POSTGRES_IP=localhost
POSTGRES_PORT=5432
POSTGRES_USER=jellystats
POSTGRES_PASSWORD=<dbpassword>
POSTGRES_DB=jellystats
JS_LISTEN_IP=localhost
#JS_BASE_URL=/jellystats
#JS_GEOLITE_ACCOUNT_ID=
#JS_GEOLITE_LICENSE_KEY=
JWT_SECRET=<token>
TZ=Europe/Brussels
MINIMUM_SECONDS_TO_INCLUDE_PLAYBACK=30
EOF
# NOTE: create the systemd service unit
cat > /lib/systemd/system/jellystats.service << EOF
[Unit]
Description=Jellystat is a free and open source Statistics App for Jellyfin
Requires=network-online.target
[email protected]
[email protected]
Requires=jellyfin.service
[Service]
EnvironmentFile=/opt/jellystats/etc/config.env
Environment="PATH=/opt/jellystats/nodeenv/bin:/usr/bin:/bin"
Environment=NODE_ENV=production
Type=simple
WorkingDirectory=/opt/jellystats/app
ExecStart=/opt/jellystats/nodeenv/bin/npm start run-app
User=jellystats
Group=jellystats
PrivateTmp=true
SyslogIdentifier=jellystats
StandardOutput=journal
StandardError=journal
Restart=always
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
systemctl enable --now jellystats
journalctl -f -u jellystats |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
You can create Jellystat as a deb application; it would be simpler because you need to install Docker, but not everyone can.
Thank you for your understanding.
Beta Was this translation helpful? Give feedback.
All reactions