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

Make docroot location configurable #9662

Closed
poikilotherm opened this issue Jun 20, 2023 · 0 comments · Fixed by #9819
Closed

Make docroot location configurable #9662

poikilotherm opened this issue Jun 20, 2023 · 0 comments · Fixed by #9819
Assignees
Labels
Component: Containers Anything related to cloudy Dataverse, shipped in containers. Feature: Container Guide Feature: Installation Guide
Milestone

Comments

@poikilotherm
Copy link
Contributor

poikilotherm commented Jun 20, 2023

Overview of the Feature Request

In certain cases, people might want to back the docroot with some mounted filesystem (this is true not just for containerized installations, but also classic ones - users can upload data, so limit the resources by using a distinct volume).

Related to #6491, this mounted filesystem might be distributed/shared/replicated/...
Related to #6656, we enabled relocation of UI data upload temp files already.

Let's make the location configurable using MPCONFIG (again).

What kind of user is the feature intended for?
Sysadmin, but also API User, Depositor, Superuser

What inspired the request?
Problem report with logo upload in containers
Milestone D of Containerization Guide

What existing behavior do you want changed?
Instead of fixing the docroot to be located in the appserver's domain folder, let's make it relocatable to some other place.
Will not just affect the web.xml config, but also some code places where this location is hardcoded.

Any brand new behavior do you want to add to Dataverse?
Not really "brand new", is it?

Any open or closed issues related to this feature request?

@poikilotherm poikilotherm moved this to Containerization (Oliver) in IQSS Dataverse Project Jun 20, 2023
@poikilotherm poikilotherm added Feature: Installation Guide Component: Containers Anything related to cloudy Dataverse, shipped in containers. Feature: Container Guide labels Jun 20, 2023
@poikilotherm poikilotherm self-assigned this Jun 20, 2023
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Jun 21, 2023
Add JVM Setting and add to config checker on startup to ensure target location is in good shape.
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Aug 22, 2023
By introducing a new static method ThemeWidgetFragment.getLogoDir
all other places (api.Access, api.Dataverse, UpdateDataverseThemeCommand,
DataverseServiceBean) can use a lookup function from one central place
instead of building the path on their own.

Reducing code duplication also means we can more easily get the location
from a setting, enabling relocation of the data. That is especially
important for container usage.

Also, we can now use ConfigCheckService to detect if the folders we configured
are read/write accessible to us.
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Aug 22, 2023
…IQSS#9662

Payara does not support looking up variables in default values of a lookup.
As a consequence, we must return to the hardcoded "./docroot" and "./uploads"
and instead supply default values using two environment variables in the
applications' Dockerfile. This way they stay configurable from cmdline or
other sources of env vars.
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Aug 22, 2023
With Files.notExist if some folder does not have the "execute"
attribute, it cannot detect a folder does not exist.
Inverting the Files.exists call solves the problem.

Also adding tests for the business logic.
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Aug 22, 2023
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Aug 22, 2023
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Aug 23, 2023
@pdurbin pdurbin added this to the 6.1 milestone Oct 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Containers Anything related to cloudy Dataverse, shipped in containers. Feature: Container Guide Feature: Installation Guide
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants