scripting / feedlandInstall

Instructions for setting up a FeedLand server.
GNU General Public License v3.0
3 stars 1 forks source link

Debugging the install process #57

Open scripting opened 4 months ago

scripting commented 4 months ago

i tried setting up a new feedland, and hit problems that seem to be related to feedId stuff, perhaps other stuff.

i was worried about this, that the changes i was making were being tested only on existing installations.

now i want to be sure people can run their own feedlands, so i'm going to have to get through this and be left with instructions that work.

i'll post notes here as i discover and hopefully fix problems.

scripting commented 4 months ago

Well I have it working.

Starting with the old setup.sql, I had to run these three commands at the command line, and the local instance is able to subscribe to feeds, read feeds and display a river.

ALTER TABLE items ADD COLUMN feedId INT UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE feeds ADD COLUMN feedId INT UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE subscriptions ADD COLUMN feedId INT UNSIGNED NOT NULL DEFAULT 0;
CREATE INDEX feedId ON items (feedId);

So I now have a virgin FeedLand running.

Next little project is to update the setup.sql doc, and then consider whether I want to merge them or just move on.

I have another product to ship, and that's more fun and productive. :smile:

scripting commented 4 months ago

Good morning. It was tough getting the new server going, but is now running nicely, and it's really empowering to have a server to work with that's just mine. I'm going to keep going today and get it tweaked up and in the process update the docs for setting up a new server so it's as easy as possible for new people to set up their own instances of FeedLand.

I had a lot of trouble getting Caddy to work with the new server, the problem was I didn't know where the Caddy configuration file was, I had a copy of it on the hard disk of the server, and kept editing it, and it still didn't work. Here's the correct way to edit the file.

sudo nano /etc/caddy/Caddyfile

Once I made the changes and restarted the server

sudo systemctl reload caddy

I was getting good HTTPS connections for FeedLand's websockets interface.

Both are covered in Scott Hanson's Caddy howto, but I was in a rush and didn't review the docs carefully before proceeding and missed this. After five decades of programming you'd think I'd know about this by now. I have a slogan for it -- "Slow down to hurry up." Good advice. I could have saved a bunch of stress and time today if I had done it. :smile:

Next up, configuring the email connection so we can create new accounts on this server.

scripting commented 4 months ago

Got the email working. Next up was News Products, but..

It's not clear to me how I'm supposed to set it up. I rewrote the feature in Sept 2023, so that it didn't require a separate server to manage news products, but I didn't test it in this context at that time. I'm going to punt on it for now and set config.flNewsProducts to false. It's going to take the better part of a day to figure this out I think, or a fresh start at least.

As a result the command to view the user's news product is disabled.

scripting commented 4 months ago

Next up, this server has email login as the default, as do all fresh installs, but the sign on dialog has no buttons, instead the instructions tell you to use the commands in the menu. This sucks. I'm pretty sure the buttons are there. I'm going to try to get them enabled by default.

image

The buttons are back.

image
scripting commented 4 months ago

I'm working on having feedId's work as they're supposed to.

When I added feedId at the beginning I didn't make it auto-increment or make it the key for the table.

According to ChatGPT these are the instructions you need to do to convert an existing FeedLand instance.

ALTER TABLE feeds 
ADD COLUMN feedId INT AUTO_INCREMENT PRIMARY KEY,
ADD UNIQUE KEY (feedUrl);

That has already been done to feedland.org and feedland.com. But it happened in a whir, and I didn't get to take notes on it.

scripting commented 4 months ago

This is the command I'm going to use to create the items table when I recreate the database on my test instance.

create table feeds (
    feedId int auto_increment primary key,
    feedUrl varchar (512) unique,
    title text, 
    htmlUrl text, 
    description text, 
    whenCreated datetime,
    whenUpdated datetime, 
    whoFirstSubscribed text,
    ctItems int default 0,
    ctSubs int default 0,
    ctSecs float,
    ctErrors int default 0, 
    ctConsecutiveErrors int default 0, 
    errorString text, 
    whenChecked datetime, 
    ctChecks int default 0, 
    whenLastError datetime, 
    urlCloudServer text, 
    whenLastCloudRenew datetime, 
    ctCloudRenews int default 0, 
    copyright text,
    generator text,
    language text,
    twitterAccount text,
    managingEditor text,
    webMaster text,
    pubDate datetime,
    lastBuildDate datetime,
    docs text,
    ttl int,
    imageUrl text,
    imageTitle text,
    imageLink text,
    imageWidth int default 0,
    imageHeight int default 0,
    imageDescription text
    );
scripting commented 4 months ago

I now have a almost virgin FeedLand with one user and some test feeds loaded. The arrow points to a feedId, so we can see this is working here. If this works, I can publish the SQL commands that created the database. I'm also working on a new starter config.json file.

image

scripting commented 4 months ago

Closing the book on this corner-turn.

https://github.com/scripting/feedlandInstall/blob/main/worknotes.md#22524-93054-am-by-dw

Summary: setup.sql has been updated so it now creates a database that's compatible with the current version of the server software. Read the worknote for the blow-by-blow. And you'll need to do what I did if you want to convert an existing installation of FeedLand to the new version of the software.