fix: move newsfeed-api off 8081 to 22672 (conflict-unlikely port)
8081 is the alt-HTTP port — one of the crowded defaults every proxy/dev server grabs — so it's collision-prone on a shared host. Move to 22672, a registered- range port in the sparse 20000s band, derived deterministically from the service name and recorded in architecture port-allocations.md. Updated everywhere the number appears: api bind config + default, firewalld service XML, nginx upstream, vite dev proxy, deploy workflow API_PORT, infra-setup (SELinux semanage label), and docs. Operator note: re-run script/infra-setup.sh on slartibartfast to relabel the SELinux port (22672) and ship the updated firewalld XML before the next deploy restarts the api on the new port. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016fKZzDpvjiJ9eYbPGgJvUP
This commit is contained in:
@@ -30,7 +30,7 @@ pub struct Config {
|
||||
impl Default for Config {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
bind: "127.0.0.1:8081".parse().expect("valid default bind addr"),
|
||||
bind: "127.0.0.1:22672".parse().expect("valid default bind addr"),
|
||||
database_path: PathBuf::from("/var/lib/newsfeed/newsfeed.db"),
|
||||
session_ttl_days: 30,
|
||||
max_db_connections: 5,
|
||||
@@ -42,7 +42,7 @@ impl Default for Config {
|
||||
|
||||
impl Config {
|
||||
/// Load configuration, layering an optional TOML file and the environment over the
|
||||
/// defaults. Env vars are `NEWSFEED_` prefixed (e.g. `NEWSFEED_BIND=0.0.0.0:8081`).
|
||||
/// defaults. Env vars are `NEWSFEED_` prefixed (e.g. `NEWSFEED_BIND=0.0.0.0:22672`).
|
||||
pub fn load(file: Option<&Path>) -> anyhow::Result<Self> {
|
||||
let mut fig = Figment::from(Serialized::defaults(Config::default()));
|
||||
if let Some(path) = file {
|
||||
|
||||
Reference in New Issue
Block a user