Skip to content

Conversation

@sirilyan
Copy link
Collaborator

@sirilyan sirilyan commented Mar 6, 2024

No description provided.

@sirilyan
Copy link
Collaborator Author

sirilyan commented Mar 6, 2024

Gonna update this with a second draft, don’t merge yet

@sirilyan
Copy link
Collaborator Author

sirilyan commented Mar 8, 2024

Good to go!

@analytik
Copy link
Contributor

analytik commented Mar 9, 2024

Thanks for this! Honestly a good guide to get it running overall, and it's pleasant to read.

Personally, I don't know if the cypress is necessary overall, or if it is (for regression tests, I assume), if it could be good to make it a devDependency, or otherwise allow the installation to slim down. But that's out of scope for this PR obviously.

Copy link
Contributor

@analytik analytik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I haven't realized this isn't merged yet. I think let's merge it, any information is better than no information right now.

I don't have merge permissions here tho, just to be clear.

@sirilyan sirilyan requested a review from johnHackworth March 25, 2024 02:26

## Dependencies

Here's a partial list of apt dependencies to get things up and running. It doesn't include dependencies that I already had installed thanks to other things running on the . (Ask me how much I want to spin up a completely new Raspbian install to verify this.)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"running on the ." <- something missing

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixing.


If you are trying to install to a directory that's on an SD card, go get several cups of coffee and a fun YouTube playlist. You'll be here a while waiting for `corepack use` to finish.

...and then you will find the install fails halfway through! Cypress thinks that you don't satisfy its system requirements. (The Cypress devs do not think people want to use it on a Pi, so their install script doesn't recognize the `armv7` architecture. Their install script defaults to assuming any architecture it doesn't recognize is ia32.) You must fool it. Go into `node_modules/cypress/lib/util.js` and edit the `getRealArch()` function:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

didn't we remove Cypress already? or it's still there somewhere

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not yet, apparently:

cypress:

On the other hand pnpm does think it's gone, because pnpm remove -D cypress keeps telling me it isn't in devDependencies:

 ERR_PNPM_CANNOT_REMOVE_MISSING_DEPS  Cannot remove 'cypress': no such dependency found in 'devDependencies'

Available dependencies: @types/gulp, @types/gulp-rename, @types/node, chalk, cross-env, execa, gulp, gulp-cssnano, gulp-rename, gulp-replace, gulp-terser, install-peers, rome, start-server-and-test, typescript


## Installing Rust

The `packages/backend/native-utils/` directory contains, well, some native code. It needs `cargo` to be installed. The `cargo` from Raspbian isn't a recent enough version to build with, so you're going to need to install it via the Rust website. We'll install it just for the `goblin` user rather than system-wide for the moment.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not in scope of this PR but we could provide pre-built binaries for the native-utils? Either on github or on my heptapod, if I figure out if there's any public download feature

On one hand complication could be in building them for all appropriate architectures, but then again it's not like this will be a massive project with thousands of downloads. But at least for low-powered systems like Raspberry it would make sense, since I don't think either of us plans to change the native-utils repo until it breaks with some node.js upgrade.

```sh
sudo -u goblin bash
cd /etc/goblin
pnpm run migrate
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doesn't it expect pnpm run init first, or the init only runs migrate? Doesn't matter probably, and i'm too lazy to check now

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gonna put it in for the moment, and then maybe later I'll try these steps from a stock Raspbian image to test it.

```sh
sudo -u goblin bash
cd /etc/goblin
pnpm run dev
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not in scope for this PR but do we want to / should we also add some rough checklist for production launch?

Given what I've seen so far from the firefish code quality, I'm guessing there could be many vulnerabilities overall, so I wouldn't think too hard about it, but I'd probably add a guide saying "do not have default passwords, do not expose ports you don't need, do not run as root, and then just change config from localhost:3000 to yourdomain.example.com" or so

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants