-
Notifications
You must be signed in to change notification settings - Fork 93
Self hosting #3728
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: integration
Are you sure you want to change the base?
Self hosting #3728
Conversation
|
Hi @Ryszard-Trojnacki Thanks for making this PR, it looks pretty useful, I know we have had people wondering how to do this in the past and so that might be helpful. I am not quite sure when we would be able to prioritize testing it, just as an FYI. But basically on first look my main comment would be about adding a dropdown section in the This looks pretty helpful though thank you for your efforts here! |
|
In the next week I will install LiteFarm on target, fresh server for our project. It will be the third installation. |
|
@Duncan-Brain I have added |
Added `.env.self-hosting` with variables dedicated for custom configuration.
…vice to work with Minio.
Added configuration to work with custom file downloading service.
2220e59 to
05b4fe6
Compare
This pull request adds new configuration variables that allow to set up embedded in code settings, adds missing service for file retrieval from Object Storage (
S3).Introduced variables:
DATABASE_HOST, DATABASE, DATABASE_USER, DATABASE_PASSWORD, DATABASE_PORTsame as other settings (DEV_DATABASE).This was done to make all modes equivalent. Old mode (
DATABASE_URL) is supported.S3_ENDPOINT, S3_PRIVATE_BUCKET_NAME, S3_PUBLIC_BUCKET_NAME, S3_ENDPOINT, S3_REGION, S3_ACCESS_KEY_ID, S3_SECRET_ACCESS_KEY, S3_FORCE_PATH_STYLE, S3_ENDPOINT_BUCKET.Till now all settings to S3 storage was embedded in code. Those variables allow to configure S3 storage. If they are not set, then old behavior is used.
HOME_PUBLIC_URL.This allows to run LiteFarm on any domain not only embbed
beta.litefarm.organdapp.litefarm.org. If not provided then old behavior is used.API_PUBLIC_URL.Same as with
HOME_PUBLIC_URL.EMAIL_TRANSPORT_USER, EMAIL_TRANSPORT_PASSWORD, EMAIL_TRANSPORT_HOST, EMAIL_TRANSPORT_PORT, EMAIL_TRANSPORT_SECURE, EMAIL_TRANSPORT_SERVICE).Till now all transport settings have been hardcoded. This introduces ability to change it to custom values.
EMAIL_SENDER.This allows to send e-mail from diffrent from address that hardcoded
[email protected].VITE_S3_SERVICE(webappmodule).Till now all requests for files where changed to
images.litefarm.workers.dev. Now this is configurable.New
fileservicemodule. I have added missingfileservicemodule that check JWT token and if it is correct andfarm_idis also correct then it returns requested file from Object Storage (S3). With theVITE_S3_SERVICEwebapp parameter this allow to own S3 storage.All changes are backwards compatible. If introduced variable is missing/not set, then old variable or hardcoded value is used.
With this pull requests there are also 2 fixes:
/packages/api/package.json:"start:prod": "node dist/api/src/server.js",PORTvariable for development mode.Next step is to change current
beta.litefarm.organdapp.litefarm.orgservers to use introduced variables and then remove the old code with hardcoded values, but this is out of scope of this pull request.Type of change
I have prepared example
.env.self-hostingfile with usage and description of new variables dedicated for self hosting scenario.How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
I have setup my own production installation of LiteFarm on my computer and on a public server.
Checklist:
This change does not affect UI or language files.