- Run
bundle installto install the Rails dependencies. cdintoclientand runyarnto install the client dependencies.- Additionally, FairImage requires the following packages to be installed on your server or dev machine if you plan to run the test suite or to use the features in parentheses:
ffmpeg(video uploads)imagemagick(image and PDF uploads)ghostscript(PDF uploads)
To start FairImage, run bundle exec rake start.
To run FairImage locally, you'll need to set up Clerk. Follow these steps:
- Create a Clerk account at https://clerk.com.
- Create a new application in Clerk.
- Make sure organizations are enabled
- Obtain your Clerk API keys under Instance -> Configure -> API Keys.
- Plug them into your
.envfile asVITE_CLERK_PUBLISHABLE_KEYandCLERK_SECRET_KEY. - Obtain your Clerk sign in URL under Configure -> Developers -> Paths -> Component paths ->
<SignIn /> - Plug it into your
.envfile asVITE_CLERK_SIGN_IN_URL.
You won't be able to sign in until the sso_id value is set on the FairImage user record you want to use.
Assuming you've got your FairImage database set up with users and orgs (either by heroku pg:pulling from staging or creating some records yourself in the console), take these steps:
For each user you want to work with (you'll probably want one admin and one non-admin):
- Create a corresponding account in the Users tab in Clerk.
- Copy the User ID value from Clerk and plug it into the FairImage user's
sso_idfield. - If you want the account to be an admin, include
is_global_admin: truein the private metadata.
For each organization:
- Create a corresponding organization in the Organizations tab in Clerk.
- Copy the Organization ID value from Clerk and plug it into the FairImage organization's
sso_idfield. - Add whichever users you want under the Members tab on the organization's Clerk page. (Note: roles are irrelevant to FairImage, but you may want to set them to reasonable values if you're planning to use this Clerk org for other apps.)