From 48ea0f89175391c26fa1cf820988532a1f08fcdc Mon Sep 17 00:00:00 2001 From: Charles Date: Wed, 14 Jul 2021 14:38:32 -0700 Subject: [PATCH] copy docs to webapp docker image (#4522) --- airbyte-webapp/Dockerfile | 3 +++ airbyte-webapp/build.gradle | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/airbyte-webapp/Dockerfile b/airbyte-webapp/Dockerfile index c247894704a5..e1054ff5154f 100644 --- a/airbyte-webapp/Dockerfile +++ b/airbyte-webapp/Dockerfile @@ -2,5 +2,8 @@ FROM nginx:1.19-alpine as webapp EXPOSE 80 +COPY build/docs docs/ +# docs get copied twice because npm gradle plugin ignores output dir. COPY build /usr/share/nginx/html +RUN rm -rf /usr/share/nginx/html/docs COPY nginx/default.conf.template /etc/nginx/templates/default.conf.template diff --git a/airbyte-webapp/build.gradle b/airbyte-webapp/build.gradle index 8e9191711b60..a377e31f51de 100644 --- a/airbyte-webapp/build.gradle +++ b/airbyte-webapp/build.gradle @@ -14,6 +14,7 @@ npm_run_build { inputs.file 'package.json' inputs.file 'package-lock.json' + // todo (cgardens) - the plugin seems to ignore this value when the copy command is run. ideally the output would be place in build/app. outputs.dir project.buildDir } @@ -29,3 +30,10 @@ task test(type: NpmTask) { assemble.dependsOn npm_run_build build.finalizedBy test +task copyDocs(type: Copy) { + from "${System.getProperty("user.dir")}/docs/integrations/getting-started" + into "${buildDir}/docs/getting-started/" +} + +copyDocs.dependsOn npm_run_build +assemble.dependsOn copyDocs