Skip to content
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

Utilize product within Openshift #3891

Closed
gil0109 opened this issue Feb 9, 2024 · 4 comments
Closed

Utilize product within Openshift #3891

gil0109 opened this issue Feb 9, 2024 · 4 comments

Comments

@gil0109
Copy link

gil0109 commented Feb 9, 2024

Currently the Docker file assumes write access to update js file.

Within Openshift environment this causes the following erro:

Generating env-config.js file from runtime environment variables...
rm: can't remove './build/env-config.js': Permission denied
./scripts/inject-runtime-env.sh: line 8: can't create ./build/env-config.js: Permission denied

Can you change to run the dockerfile as user? or have a volume mount for files that require modification? Or use environment variables instead?

https://developers.redhat.com/articles/2023/03/23/10-tips-writing-secure-maintainable-dockerfiles#10_tips_and_best_practices_for_dockerfiles

@FelixMalfait
Copy link
Member

Hey Karim, good point. We need to improve the self-hosting experience, this hasn't been a top priority yet as we are still focused on feature development.

CC @charlesBochet assigning you

@charlesBochet
Copy link
Member

@gil0109 We do it for our twenty-postgres container here: packages/twenty-docker/prod/twenty-postgres/Dockerfile but we don't for our twenty-server and twenty-front containers.

If you feel confortable, it would be great to update these two so it follows the same pattern

@gil0109
Copy link
Author

gil0109 commented Feb 13, 2024

There seems to be more work needed and I don't think I have the skillz.

For Front-End: I am thinking that there may need to be a PV created, a read/write area for just the files that need to be updated.
--> I just changed the permissions of the build folder. It started but I think that may be a security issue.

For Server:

I am wondering if there is script needed that checks if the DB exists and isn't initialized, and then initialize it.
When I run the yarn nx database:init twenty-server command in the twenty-server pod, i get the following error:

NX EACCES: permission denied, open '/app/.nx/cache/d/daemon.log'

@FelixMalfait
Copy link
Member

Will by fixed by #5340

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

No branches or pull requests

3 participants