diff --git a/services/filestore/app/js/GcsPersistor.js b/services/filestore/app/js/GcsPersistor.js index 50cac9bda8..d81fc40b03 100644 --- a/services/filestore/app/js/GcsPersistor.js +++ b/services/filestore/app/js/GcsPersistor.js @@ -19,6 +19,9 @@ if (settings.filestore.gcs && settings.filestore.gcs.apiEndpoint) { request: function(reqOpts) { const url = new URL(reqOpts.uri) url.host = settings.filestore.gcs.apiEndpoint + if (settings.filestore.gcs.apiScheme) { + url.protocol = settings.filestore.gcs.apiScheme + } reqOpts.uri = url.toString() return reqOpts } diff --git a/services/filestore/docker-compose.ci.yml b/services/filestore/docker-compose.ci.yml index fe4eaa35fd..d3accee799 100644 --- a/services/filestore/docker-compose.ci.yml +++ b/services/filestore/docker-compose.ci.yml @@ -34,11 +34,11 @@ services: AWS_SECRET_ACCESS_KEY: fake AWS_S3_PATH_STYLE: 'true' GCS_API_ENDPOINT: gcs:9090 + GCS_API_SCHEME: http GCS_USER_FILES_BUCKET_NAME: fake_userfiles GCS_TEMPLATE_FILES_BUCKET_NAME: fake_templatefiles GCS_PUBLIC_FILES_BUCKET_NAME: fake_publicfiles - NODE_TLS_REJECT_UNAUTHORIZED: 0 - STORAGE_EMULATOR_HOST: https://gcs:9090/storage/v1 + STORAGE_EMULATOR_HOST: http://gcs:9090/storage/v1 depends_on: s3: condition: service_healthy diff --git a/services/filestore/docker-compose.yml b/services/filestore/docker-compose.yml index d904574f84..54ef9c00c9 100644 --- a/services/filestore/docker-compose.yml +++ b/services/filestore/docker-compose.yml @@ -44,11 +44,11 @@ services: AWS_ACCESS_KEY_ID: fake AWS_SECRET_ACCESS_KEY: fake GCS_API_ENDPOINT: gcs:9090 + GCS_API_SCHEME: http GCS_USER_FILES_BUCKET_NAME: fake_userfiles GCS_TEMPLATE_FILES_BUCKET_NAME: fake_templatefiles GCS_PUBLIC_FILES_BUCKET_NAME: fake_publicfiles - NODE_TLS_REJECT_UNAUTHORIZED: 0 - STORAGE_EMULATOR_HOST: https://gcs:9090/storage/v1 + STORAGE_EMULATOR_HOST: http://gcs:9090/storage/v1 user: node depends_on: s3: diff --git a/services/filestore/test/acceptance/deps/Dockerfile.fake-gcs b/services/filestore/test/acceptance/deps/Dockerfile.fake-gcs index f8313cbce0..6acb2d63b4 100644 --- a/services/filestore/test/acceptance/deps/Dockerfile.fake-gcs +++ b/services/filestore/test/acceptance/deps/Dockerfile.fake-gcs @@ -2,4 +2,4 @@ FROM fsouza/fake-gcs-server RUN apk add --update --no-cache curl COPY healthcheck.sh /healthcheck.sh HEALTHCHECK --interval=1s --timeout=1s --retries=30 CMD /healthcheck.sh http://localhost:9090 -CMD ["--port=9090"] +CMD ["--port=9090", "--scheme=http"] diff --git a/services/filestore/test/acceptance/js/TestConfig.js b/services/filestore/test/acceptance/js/TestConfig.js index e673ace71c..fd7d0f034c 100644 --- a/services/filestore/test/acceptance/js/TestConfig.js +++ b/services/filestore/test/acceptance/js/TestConfig.js @@ -22,6 +22,7 @@ function s3Stores() { function gcsConfig() { return { apiEndpoint: process.env.GCS_API_ENDPOINT, + apiScheme: process.env.GCS_API_SCHEME, projectId: 'fake' } }