diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index db4356d24..848e3fa76 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -41,6 +41,18 @@ jobs: echo VITE_DATAVERSE_BACKEND_URL="$DATAVERSE_BACKEND_URL" >> .env shell: bash + - name: Create containerized development environment .env file + working-directory: dev-env + run: cp .env.example .env + shell: bash + + - name: Set S3 secrets for the containerized development environment + working-directory: dev-env + run: | + sed -i -e 's//${{ secrets.S3_ACCESS_KEY }}/g' .env + sed -i -e 's//${{ secrets.S3_SECRET_KEY }}/g' .env + shell: bash + - name: Update registry for the containerized development environment working-directory: dev-env run: | diff --git a/dev-env/.env b/dev-env/.env deleted file mode 100644 index 3745eed3b..000000000 --- a/dev-env/.env +++ /dev/null @@ -1,4 +0,0 @@ -POSTGRES_VERSION=13 -DATAVERSE_DB_USER=dataverse -SOLR_VERSION=9.3.0 -REGISTRY=docker.io \ No newline at end of file diff --git a/dev-env/.env.example b/dev-env/.env.example new file mode 100644 index 000000000..972aa9026 --- /dev/null +++ b/dev-env/.env.example @@ -0,0 +1,6 @@ +POSTGRES_VERSION=13 +DATAVERSE_DB_USER=dataverse +SOLR_VERSION=9.3.0 +REGISTRY=docker.io +S3_ACCESS_KEY= +S3_SECRET_KEY= diff --git a/dev-env/.gitignore b/dev-env/.gitignore new file mode 100644 index 000000000..4c49bd78f --- /dev/null +++ b/dev-env/.gitignore @@ -0,0 +1 @@ +.env diff --git a/dev-env/docker-compose-dev.yml b/dev-env/docker-compose-dev.yml index 68b1b6c40..94b83bae0 100644 --- a/dev-env/docker-compose-dev.yml +++ b/dev-env/docker-compose-dev.yml @@ -44,6 +44,7 @@ services: restart: on-failure user: payara environment: + dataverse_files_storage__driver__id: s3 DATAVERSE_DB_HOST: postgres DATAVERSE_DB_PASSWORD: secret DATAVERSE_DB_USER: ${DATAVERSE_DB_USER} @@ -54,6 +55,19 @@ services: -Ddataverse.pid.fake.label=FakeDOIProvider -Ddataverse.pid.fake.authority=10.5072 -Ddataverse.pid.fake.shoulder=FK2/ + -Ddataverse.files.s3.access-key=${S3_ACCESS_KEY} + -Ddataverse.files.s3.label=s3 + -Ddataverse.files.s3.secret-key=${S3_SECRET_KEY} + -Ddataverse.files.storage-driver-id=s3 + -Ddataverse.files.s3.type=s3 + -Ddataverse.files.s3.bucket-name=beta-dataverse-direct + -Ddataverse.files.s3.upload-redirect=true + -Ddataverse.files.s3.download-redirect=true + -Ddataverse.files.s3.ingestsizelimit=50000000 + -Ddataverse.files.s3.url-expiration-minutes=60 + -Ddataverse.files.s3.connection-pool-size=2048 + -Ddataverse.files.s3.custom-endpoint-region=us-east-1 + -Ddataverse.files.s3.custom-endpoint-url=https://s3.us-east-1.amazonaws.com expose: - '8080' networks: diff --git a/src/sections/collection/datasets-list/file-card/FileCardHeader.tsx b/src/sections/collection/datasets-list/file-card/FileCardHeader.tsx index 034e7d27b..a8a887920 100644 --- a/src/sections/collection/datasets-list/file-card/FileCardHeader.tsx +++ b/src/sections/collection/datasets-list/file-card/FileCardHeader.tsx @@ -6,6 +6,7 @@ import { DatasetLabels } from '../../../dataset/dataset-labels/DatasetLabels' import { FileCardIcon } from './FileCardIcon' import { FileType } from '../../../../files/domain/models/FileMetadata' import { FileCardHelper } from './FileCardHelper' +import { DvObjectType } from '../../../../shared/hierarchy/domain/models/UpwardHierarchyNode' interface FileCardHeaderProps { filePreview: FilePreview @@ -18,6 +19,7 @@ export function FileCardHeader({ filePreview }: FileCardHeaderProps) {