-
Notifications
You must be signed in to change notification settings - Fork 5
Raspberry Pi install guide (first draft) #32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Gonna update this with a second draft, don’t merge yet |
|
Good to go! |
|
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. |
analytik
left a comment
There was a problem hiding this 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.
doc/raspbian_install.md
Outdated
|
|
||
| ## 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.) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not yet, apparently:
Line 48 in 4a116a8
| 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. |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
No description provided.