You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 5, 2024. It is now read-only.
This is kind of a collection of things I had to do to install Journal on a VPS.
no need for yarn install
skipped installing with homebrew (why would I install this on linux if I don't need it? Installed by running the script's commands manually:
created a linux user for journal
created a postgres user for journal with sudo -u postgres createuser -D -A -P journal
followed these instructions to install ruby (2.6.5) and bundler
cloned the journal repo and exported the correct ENV variables with the journal user
created + migrated the db with rake
switched to RAILS_ENV="production", which meant also editing the config/environments/production.rb file:
added config.hosts << my.host.tld
commented out config.assets.compile = false
changed port in config/puma.rb from 3000 to my own value (I actually think this can be set later when you call rails, but I'm not sure)
Then, running bundle exec rails s in the folder as the user journal should work for launching the application. To make it a systemd service was a little more complex. This is what the service file ended up looking like:
The one thing that got me with systemd was that initially I was missing bash in my PATH, so the service was just returning a 127 error code. I found out that bash was missing by looking at journalctl -b logs.
This basically was installing Journal on a VPS without homebrew (not required) and without Docker, setting it up as a system service. If you want, I can try to write this into a .md and make a PR, but I'd just figure I'd write this down first of all so that if anyone ever wants to do the same, they have something to rely on.
The text was updated successfully, but these errors were encountered:
Looks like my installation still isn't perfect - sharing posts isn't working. It's not super ideal to mention in the install instructions that you need to call some ruby functions to get random bytes in base64 - maybe this could be done in shell instead?
Also, why do you need specifically 32/64 random bytes? Is this a Puma/Ruby/Rails thing, or something set by the application?
@charlesoblack Thanks for calling this stuff out! And glad you like the app. The install steps are by no means perfect - there is now a Docker install which might solve some of this pain.
yarn install should be removed from install steps now - that was an error on my part.
For the keys - they need to be a specific length. This is required by the openssl gem that is used for encrypting contents. They are base64 encoded just so they work as ENV vars.
As for everything else you called out, I'm not very familiar with setting up systemd and whatnot, would definitely accept a PR with more installation options!
This is kind of a collection of things I had to do to install Journal on a VPS.
yarn install
homebrew
(why would I install this on linux if I don't need it? Installed by running the script's commands manually:sudo -u postgres createuser -D -A -P journal
rake
RAILS_ENV="production"
, which meant also editing theconfig/environments/production.rb
file:config.hosts << my.host.tld
config.assets.compile = false
config/puma.rb
from 3000 to my own value (I actually think this can be set later when you callrails
, but I'm not sure)Then, running
bundle exec rails s
in the folder as the userjournal
should work for launching the application. To make it a systemd service was a little more complex. This is what the service file ended up looking like:The one thing that got me with systemd was that initially I was missing
bash
in myPATH
, so the service was just returning a 127 error code. I found out thatbash
was missing by looking atjournalctl -b
logs.This basically was installing Journal on a VPS without homebrew (not required) and without Docker, setting it up as a system service. If you want, I can try to write this into a
.md
and make a PR, but I'd just figure I'd write this down first of all so that if anyone ever wants to do the same, they have something to rely on.The text was updated successfully, but these errors were encountered: