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

add file previewers to dev env, more docs #11181

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions doc/release-notes/10506-previewers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
### File Previews Available in Dev Environment, More Docs

In Dataverse 6.5 File Previewers were enabled in the "demo or eval" containerized (Dockerized) environment (#11025). These previewers are now available in the development environment as well and [documentation](https://dataverse-guide--11181.org.readthedocs.build/en/11181/container/running/demo.html#file-previewers) has been added explaining how to configure them. See also #10506 and #11181.
21 changes: 21 additions & 0 deletions doc/sphinx-guides/source/container/running/demo.rst
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,27 @@ PID Providers

Dataverse supports multiple Persistent ID (PID) providers. The ``compose.yml`` file uses the Permalink PID provider. Follow :ref:`pids-configuration` to reconfigure as needed.

File Previewers
+++++++++++++++

By default, all available file previewers are enabled (see :ref:`file-previews` in the User Guide for details). Specifically, we enable all the previewers that are available in the `trivadis/dataverse-previewers-provider <https://hub.docker.com/r/trivadis/dataverse-previewers-provider>`_ image (`code <https://github.com/TrivadisPF/docker-register-dataverse-previewers>`_). You can run the following command to see a list of available previewers:

``docker run trivadis/dataverse-deploy-previewers:latest previewers``

You should expect to see output like this:

.. code-block:: text

name description
----------------------------
text Read the text file.
html View the html file.
...

If you want to specify fewer previewers, you can edit the ``compose.yml`` file. Uncomment "INCLUDE_PREVIEWERS" and list the previewers you want, separated by commas, like this:

``INCLUDE_PREVIEWERS=text,html,pdf,csv``

Next Steps
----------

Expand Down
36 changes: 36 additions & 0 deletions docker-compose-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,42 @@ services:
MINIO_ROOT_PASSWORD: s3cr3t_4cc355_k3y
command: server /data

previewers-provider:
container_name: previewers-provider
hostname: previewers-provider
image: trivadis/dataverse-previewers-provider:latest
ports:
- "9080:9080"
networks:
- dataverse
environment:
# have nginx match the port we run previewers on
- NGINX_HTTP_PORT=9080
- PREVIEWERS_PROVIDER_URL=http://localhost:9080
- VERSIONS="v1.4,betatest"
# https://docs.docker.com/reference/compose-file/services/#platform
# https://github.com/fabric8io/docker-maven-plugin/issues/1750
platform: linux/amd64

register-previewers:
container_name: register-previewers
hostname: register-previewers
image: trivadis/dataverse-deploy-previewers:latest
networks:
- dataverse
environment:
- DATAVERSE_URL=http://dataverse:8080
- TIMEOUT=10m
- PREVIEWERS_PROVIDER_URL=http://localhost:9080
# Uncomment to specify which previewers you want. Otherwise you get all of them.
#- INCLUDE_PREVIEWERS=text,html,pdf,csv,comma-separated-values,tsv,tab-separated-values,jpeg,png,gif,markdown,x-markdown
- EXCLUDE_PREVIEWERS=
- REMOVE_EXISTING=true
command:
- deploy
restart: "no"
platform: linux/amd64

networks:
dataverse:
driver: bridge
3 changes: 2 additions & 1 deletion docker/compose/demo/compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ services:
- DATAVERSE_URL=http://dataverse:8080
- TIMEOUT=10m
- PREVIEWERS_PROVIDER_URL=http://${MACHINE_IP:-localhost}:9000
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we consider removing this MACHINE_IP stuff from this compose file? We already removed it from the dev version.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I expect that it would make a lot of sense to be able to provide an alternative IP address (or host name) in a production environment. Leaving it in would be a good idea IMHO.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I suspect we'll dig into this more when we work on fronting Dataverse with some sort of proxy:

- INCLUDE_PREVIEWERS=text,html,pdf,csv,comma-separated-values,tsv,tab-separated-values,jpeg,png,gif,markdown,x-markdown
# Uncomment to specify which previewers you want. Otherwise you get all of them.
#- INCLUDE_PREVIEWERS=text,html,pdf,csv,comma-separated-values,tsv,tab-separated-values,jpeg,png,gif,markdown,x-markdown
- EXCLUDE_PREVIEWERS=
- REMOVE_EXISTING=True
command:
Expand Down