diff --git a/internal/nodejs/__snapshots__/template_test.snap b/internal/nodejs/__snapshots__/template_test.snap index 9cbc17c5..948829bc 100755 --- a/internal/nodejs/__snapshots__/template_test.snap +++ b/internal/nodejs/__snapshots__/template_test.snap @@ -6,12 +6,10 @@ ENV PORT=8080 WORKDIR /src RUN corepack enable && corepack prepare --all -COPY package.json package-lock.json* yarn.lock* pnpm-lock.yaml* .npmrc* ./ +COPY . . RUN yarn install -COPY . . - # Build if we can build it @@ -29,12 +27,10 @@ ENV PORT=8080 WORKDIR /src RUN corepack enable && corepack prepare --all -COPY package.json package-lock.json* yarn.lock* pnpm-lock.yaml* .npmrc* ./ +COPY . . RUN yarn install -COPY . . - # Build if we can build it @@ -46,6 +42,7 @@ RUN echo "\ server { \ listen 8080; \ root /usr/share/nginx/html/static; \ + absolute_redirect off; \ location / { \ try_files \$uri \$uri.html \$uri/index.html /404.html =404; \ } \ @@ -62,12 +59,10 @@ ENV PORT=8080 WORKDIR /src RUN corepack enable && corepack prepare --all -COPY package.json package-lock.json* yarn.lock* pnpm-lock.yaml* .npmrc* ./ +COPY . . RUN yarn install -COPY . . - # Build if we can build it @@ -79,6 +74,7 @@ RUN echo "\ server { \ listen 8080; \ root /usr/share/nginx/html/static; \ + absolute_redirect off; \ location / { \ try_files \$uri /index.html; \ } \ @@ -95,12 +91,10 @@ ENV PORT=8080 WORKDIR /src RUN corepack enable && corepack prepare --all -COPY package.json package-lock.json* yarn.lock* pnpm-lock.yaml* .npmrc* ./ +COPY . . RUN yarn install -COPY . . - # Build if we can build it RUN yarn build @@ -118,12 +112,10 @@ ENV PORT=8080 WORKDIR /src RUN corepack enable && corepack prepare --all -COPY package.json package-lock.json* yarn.lock* pnpm-lock.yaml* .npmrc* ./ +COPY . . RUN yarn install -COPY . . - # Build if we can build it RUN yarn build @@ -135,6 +127,7 @@ RUN echo "\ server { \ listen 8080; \ root /usr/share/nginx/html/static; \ + absolute_redirect off; \ location / { \ try_files \$uri /index.html; \ } \ diff --git a/internal/python/plan.go b/internal/python/plan.go index 0167121f..ff64b38e 100644 --- a/internal/python/plan.go +++ b/internal/python/plan.go @@ -318,10 +318,10 @@ func determineInstallCmd(ctx *pythonPlanContext) string { } func determineAptDependencies(ctx *pythonPlanContext) []string { - var deps []string + deps := []string{"build-essential"} if HasDependency(ctx, "mysqlclient") { - deps = append(deps, "libmariadb-dev", "build-essential") + deps = append(deps, "libmariadb-dev") } if HasDependency(ctx, "psycopg2") { diff --git a/internal/python/python.go b/internal/python/python.go index 17b1c8c5..2794e953 100644 --- a/internal/python/python.go +++ b/internal/python/python.go @@ -15,7 +15,7 @@ func GenerateDockerfile(meta types.PlanMeta) (string, error) { dockerfile += `WORKDIR /app RUN apt-get update -RUN apt-get install ` + aptDeps + ` gcc -y +RUN apt-get install -y ` + aptDeps + ` RUN rm -rf /var/lib/apt/lists/* COPY . . RUN ` + installCmd + ` diff --git a/pkg/zeaburpack/main.go b/pkg/zeaburpack/main.go index 5375834a..72feed25 100644 --- a/pkg/zeaburpack/main.go +++ b/pkg/zeaburpack/main.go @@ -185,6 +185,8 @@ func Build(opt *BuildOptions) error { return nil } +// unused because we are refactoring this part. Ignore this for now. +// nolint:unused func extractStaticOutput(resultImage string, opt *BuildOptions) error { copyFiles := `FROM ` + resultImage + ` CMD ["cp", "-r", "/usr/share/nginx/html/static", "/out/"]` diff --git a/tests/python-hnswlib/app.py b/tests/python-hnswlib/app.py new file mode 100644 index 00000000..b3504508 --- /dev/null +++ b/tests/python-hnswlib/app.py @@ -0,0 +1,3 @@ +import numpy + +print("Passed!") diff --git a/tests/python-hnswlib/requirements.txt b/tests/python-hnswlib/requirements.txt new file mode 100644 index 00000000..77fec65e --- /dev/null +++ b/tests/python-hnswlib/requirements.txt @@ -0,0 +1 @@ +hnswlib==0.7.0