mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Use http for the fake GCS server
This commit is contained in:
parent
30114cd79b
commit
3bb956b38e
5 changed files with 9 additions and 5 deletions
|
@ -19,6 +19,9 @@ if (settings.filestore.gcs && settings.filestore.gcs.apiEndpoint) {
|
||||||
request: function(reqOpts) {
|
request: function(reqOpts) {
|
||||||
const url = new URL(reqOpts.uri)
|
const url = new URL(reqOpts.uri)
|
||||||
url.host = settings.filestore.gcs.apiEndpoint
|
url.host = settings.filestore.gcs.apiEndpoint
|
||||||
|
if (settings.filestore.gcs.apiScheme) {
|
||||||
|
url.protocol = settings.filestore.gcs.apiScheme
|
||||||
|
}
|
||||||
reqOpts.uri = url.toString()
|
reqOpts.uri = url.toString()
|
||||||
return reqOpts
|
return reqOpts
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,11 +34,11 @@ services:
|
||||||
AWS_SECRET_ACCESS_KEY: fake
|
AWS_SECRET_ACCESS_KEY: fake
|
||||||
AWS_S3_PATH_STYLE: 'true'
|
AWS_S3_PATH_STYLE: 'true'
|
||||||
GCS_API_ENDPOINT: gcs:9090
|
GCS_API_ENDPOINT: gcs:9090
|
||||||
|
GCS_API_SCHEME: http
|
||||||
GCS_USER_FILES_BUCKET_NAME: fake_userfiles
|
GCS_USER_FILES_BUCKET_NAME: fake_userfiles
|
||||||
GCS_TEMPLATE_FILES_BUCKET_NAME: fake_templatefiles
|
GCS_TEMPLATE_FILES_BUCKET_NAME: fake_templatefiles
|
||||||
GCS_PUBLIC_FILES_BUCKET_NAME: fake_publicfiles
|
GCS_PUBLIC_FILES_BUCKET_NAME: fake_publicfiles
|
||||||
NODE_TLS_REJECT_UNAUTHORIZED: 0
|
STORAGE_EMULATOR_HOST: http://gcs:9090/storage/v1
|
||||||
STORAGE_EMULATOR_HOST: https://gcs:9090/storage/v1
|
|
||||||
depends_on:
|
depends_on:
|
||||||
s3:
|
s3:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
|
|
|
@ -44,11 +44,11 @@ services:
|
||||||
AWS_ACCESS_KEY_ID: fake
|
AWS_ACCESS_KEY_ID: fake
|
||||||
AWS_SECRET_ACCESS_KEY: fake
|
AWS_SECRET_ACCESS_KEY: fake
|
||||||
GCS_API_ENDPOINT: gcs:9090
|
GCS_API_ENDPOINT: gcs:9090
|
||||||
|
GCS_API_SCHEME: http
|
||||||
GCS_USER_FILES_BUCKET_NAME: fake_userfiles
|
GCS_USER_FILES_BUCKET_NAME: fake_userfiles
|
||||||
GCS_TEMPLATE_FILES_BUCKET_NAME: fake_templatefiles
|
GCS_TEMPLATE_FILES_BUCKET_NAME: fake_templatefiles
|
||||||
GCS_PUBLIC_FILES_BUCKET_NAME: fake_publicfiles
|
GCS_PUBLIC_FILES_BUCKET_NAME: fake_publicfiles
|
||||||
NODE_TLS_REJECT_UNAUTHORIZED: 0
|
STORAGE_EMULATOR_HOST: http://gcs:9090/storage/v1
|
||||||
STORAGE_EMULATOR_HOST: https://gcs:9090/storage/v1
|
|
||||||
user: node
|
user: node
|
||||||
depends_on:
|
depends_on:
|
||||||
s3:
|
s3:
|
||||||
|
|
|
@ -2,4 +2,4 @@ FROM fsouza/fake-gcs-server
|
||||||
RUN apk add --update --no-cache curl
|
RUN apk add --update --no-cache curl
|
||||||
COPY healthcheck.sh /healthcheck.sh
|
COPY healthcheck.sh /healthcheck.sh
|
||||||
HEALTHCHECK --interval=1s --timeout=1s --retries=30 CMD /healthcheck.sh http://localhost:9090
|
HEALTHCHECK --interval=1s --timeout=1s --retries=30 CMD /healthcheck.sh http://localhost:9090
|
||||||
CMD ["--port=9090"]
|
CMD ["--port=9090", "--scheme=http"]
|
||||||
|
|
|
@ -22,6 +22,7 @@ function s3Stores() {
|
||||||
function gcsConfig() {
|
function gcsConfig() {
|
||||||
return {
|
return {
|
||||||
apiEndpoint: process.env.GCS_API_ENDPOINT,
|
apiEndpoint: process.env.GCS_API_ENDPOINT,
|
||||||
|
apiScheme: process.env.GCS_API_SCHEME,
|
||||||
projectId: 'fake'
|
projectId: 'fake'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue