mirror of
https://github.com/go-shiori/shiori.git
synced 2026-04-24 22:15:52 +03:00
[PR #844] [CLOSED] Update Configuration.md to show SHIORI_HTTP_PORT deprecation. #816
Labels
No labels
component:backend
component:builds
component:builds
component:extension
component:frontend
component:readability
database
database:mysql
database:postgres
database:sqlite
feature:ebooks
github_actions
good first issue
hacktoberfest
note:duplicate?
note:fixed?
note:out-of-scope?
os:windows
priority:high
priority:low
pull-request
resolution:as-intended
resolution:cant-reproduce
resolution:duplicate
resolution:fixed
resolution:wontfix
tag:TBD
tag:big-task
tag:help-wanted
tag:huge-data
tag:meta
tag:more-info
tag:next
tag:no-stale
tag:requires-migrations
tag:research
tag:security 🛡️
tag:stale
tag:waiting-for-assignee
type:bug
type:documentation
type:enhancement
type:meta
type:ux
user:cli
user:web
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/shiori#816
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/go-shiori/shiori/pull/844
Author: @tenpai-git
Created: 2/18/2024
Status: ❌ Closed
Base:
master← Head:patch-1📝 Commits (1)
49210efUpdate Configuration.md to show SHIORI_HTTP_PORT deprecation.📊 Changes
1 file changed (+3 additions, -2 deletions)
View changed files
📝
docs/Configuration.md(+3 -2)📄 Description
Data
Describe the bug / actual behavior
The configuration page has
SHIORI_HTTP_PORTas a port you can assign as an environment variable for Linux distributions. However, even if you set the environment variable at the system level, the assignment will not work. With the introduction of the-pflag, it seems that Shiori will always default to 8080, no matter what you setSHIORI_HTTP_PORTto be as an environment variable, because the runtime variable is a higher priority. Instead you must set-pat runtime, or the hosted port will not change.This is meant to be a simple pull request before the overall documentation revamp.
Proposed Change
Because other options are also deprecated, I recommend making another note in the configuration documentation about this for now in the same style as the other deprecation, as to reduce confusion for current users of Shiori. A future update for Shiori can address all deprecated configuration options and be easily found on this page for the developers.
To Reproduce
Steps to reproduce the behavior:
/etc/environmentfor your Linux-based system (I used a Debian 12 Linux Container, location may slightly differ based on OS). This will make a global system variable accessible anywhere to your program, including Shiori.root@host# echo SHIORI_HTTP_PORT=15000 >> /etc/environmentLoad your change to the file into the current running system environment.
source /etc/environmentDownload, compile, and run Shiori on the same system. It will tell you the web server is running the HTTP protocol on port
8080.In the directory you want to download Shiori:
git clone https://github.com/go-shiori/shioriUse
cdto enter that directory and compile and run the binary:go build main.go./main serverThe output will look like this:
Setting a custom port.
The only way to change this behavior currently is to use the
poption (for example, a custom port of 16000):./main server -p 16000The output should then become:
Notes
This solution doesn't change the behavior of Shiori at all, it is only designed to be a temporary note in the same style as existing documentation to make addressing it easier later.
This documentation change will make it more clear to save time for users looking on how to set environment variables on manual or Infrastructure-As-Code automated installations (Ansible), and those unfamiliar with Golang.
Alternative solutions are to remove both deprecation notes and the options from the tables, and/or make a new table for deprecated options towards the bottom of the article in case additional deprecations are expected in upcoming development.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.