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
Changes from 1 commit
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
Next Next commit
add file previewers to dev env, more docs #10506
pdurbin committed Jan 23, 2025

Verified

This commit was signed with the committer’s verified signature.
commit 3399de383324e6ff41e612a510b79987d390d519
5 changes: 5 additions & 0 deletions doc/sphinx-guides/source/container/running/demo.rst
Original file line number Diff line number Diff line change
@@ -165,6 +165,11 @@ 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). If you want to specify fewer previewers, you can edit the ``compose.yml`` file. Look for the "INCLUDE_PREVIEWERS" line.

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

36 changes: 36 additions & 0 deletions docker-compose-dev.yml
Original file line number Diff line number Diff line change
@@ -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
@@ -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: