diff --git a/dbrepo-storage-service/init/Dockerfile b/dbrepo-storage-service/init/Dockerfile index 4f4f0c797434901d27311cadbbe250bb0e96c480..252163754975db597fcbde8c9d45536ab1b95fe2 100644 --- a/dbrepo-storage-service/init/Dockerfile +++ b/dbrepo-storage-service/init/Dockerfile @@ -10,4 +10,6 @@ WORKDIR /app COPY --chown=1001 --chmod=0744 ./init.sh /app/init.sh +RUN mkdir -p /app/config + ENTRYPOINT [ "bash", "-c", "/app/init.sh" ] diff --git a/dbrepo-storage-service/init/init.sh b/dbrepo-storage-service/init/init.sh index 4cadc056774594d9e823d27095f982b77b855b2c..50ead671dba3a1f2058ee861e0d8569dc43f167f 100644 --- a/dbrepo-storage-service/init/init.sh +++ b/dbrepo-storage-service/init/init.sh @@ -1,5 +1,5 @@ #!/bin/bash -cat << EOF > /app/.s3cfg +cat << EOF > /app/config/.s3cfg access_key = ${S3_ACCESS_KEY_ID} secret_key = ${S3_SECRET_ACCESS_KEY} # Setup endpoint @@ -9,4 +9,4 @@ use_https = False # Enable S3 v4 signature APIs signature_v2 = False EOF -s3cmd --config=/app/.s3cfg mb s3://${S3_BUCKET} \ No newline at end of file +s3cmd --config=/app/config/.s3cfg mb s3://${S3_BUCKET} \ No newline at end of file diff --git a/helm/dbrepo/templates/storage-job.yaml b/helm/dbrepo/templates/storage-job.yaml index f24e9afa333b995bbfea4effc5def050c752831a..92174539affea89bf1890e673755917d7d15f43f 100644 --- a/helm/dbrepo/templates/storage-job.yaml +++ b/helm/dbrepo/templates/storage-job.yaml @@ -50,7 +50,7 @@ spec: key: STORAGE_ENDPOINT volumeMounts: - name: app-cache - mountPath: /app + mountPath: /app/config {{- if .Values.storageservice.init.resources }} resources: {{- toYaml .Values.storageservice.init.resources | nindent 12 }} {{- else if ne .Values.storageservice.init.resourcesPreset "none" }} diff --git a/helm/dbrepo/values.yaml b/helm/dbrepo/values.yaml index 9ac022cdf12c5edc92137f3ca974540f58f6a488..9119a13dd5ffe08c11ec8125a0e3f051a6179efd 100644 --- a/helm/dbrepo/values.yaml +++ b/helm/dbrepo/values.yaml @@ -721,7 +721,7 @@ storageservice: init: image: ## @skip storageservice.init.image.name - name: registry.datalab.tuwien.ac.at/dbrepo/storage-service-init:1.6.0rc2 + name: registry.datalab.tuwien.ac.at/dbrepo/storage-service-init:1.6.0rc6 s3: ## @param storageservice.init.s3.endpoint The S3-capable endpoint the microservice connects to. endpoint: http://storage-service-s3:8333