diff --git a/.github/check_charts.yaml b/.github/workflows/check_charts.yaml similarity index 82% rename from .github/check_charts.yaml rename to .github/workflows/check_charts.yaml index ab2fb68..3e22595 100644 --- a/.github/check_charts.yaml +++ b/.github/workflows/check_charts.yaml @@ -9,7 +9,7 @@ on: - '*' paths: # Only run test and docker publish if some code have changed - - 'deployment/k8s/charts/**' + - 'deployment/helm/**' - '.github/workflows/check_charts.yaml' pull_request: @@ -25,7 +25,7 @@ jobs: - name: Check Version run: | current_version=$(grep '^version=' pyproject.toml | cut -f2 -d= | tr -d ' ' | tr -d '"') - app_version=$(grep 'appVersion:' deployment/k8s/charts/Chart.yaml | cut -f2 -d: | tr -d ' ') + app_version=$(grep 'appVersion:' deployment/helm/Chart.yaml | cut -f2 -d: | tr -d ' ' | tr -d '"') if [[ "$current_version" != "$app_version" ]]; then echo "❌ current version from pyproject.toml ($current_version) and appVersion from Chart.yaml ($app_version) differs"; exit 1; @@ -46,13 +46,13 @@ jobs: - name: Run chart-testing (list-changed) id: list-changed run: | - changed=$(ct list-changed --chart-dirs deployment/k8s --target-branch ${{ github.event.repository.default_branch }}) + changed=$(ct list-changed --chart-dirs deployment --target-branch ${{ github.event.repository.default_branch }}) if [[ -n "$changed" ]]; then echo "::set-output name=changed::true" fi - name: Run chart-testing (lint) - run: ct lint --chart-dirs deployment/k8s --target-branch ${{ github.event.repository.default_branch }} + run: ct lint --chart-dirs deployment --target-branch ${{ github.event.repository.default_branch }} - name: Build container uses: docker/build-push-action@v6 @@ -60,7 +60,7 @@ jobs: with: platforms: linux/amd64 context: . - file: dockerfiles/Dockerfile + file: webapp/Dockerfile push: false tags: "polder:dev" diff --git a/deployment/helm/Chart.lock b/deployment/helm/Chart.lock new file mode 100644 index 0000000..53c759d --- /dev/null +++ b/deployment/helm/Chart.lock @@ -0,0 +1,6 @@ +dependencies: +- name: eoapi + repository: https://devseed.com/eoapi-k8s/ + version: 0.4.17 +digest: sha256:adbb8a0db399bf32efbf12ffafafbf07c6d4f676f78b2bf2aa6befdc5f1a4f51 +generated: "2024-10-16T11:33:15.655622351+02:00" diff --git a/helm/Chart.yaml b/deployment/helm/Chart.yaml similarity index 100% rename from helm/Chart.yaml rename to deployment/helm/Chart.yaml diff --git a/helm/charts/eoapi-0.4.17.tgz b/deployment/helm/charts/eoapi-0.4.17.tgz similarity index 100% rename from helm/charts/eoapi-0.4.17.tgz rename to deployment/helm/charts/eoapi-0.4.17.tgz diff --git a/helm/templates/Webapp.yml b/deployment/helm/templates/Webapp.yml similarity index 100% rename from helm/templates/Webapp.yml rename to deployment/helm/templates/Webapp.yml diff --git a/helm/values.yaml b/deployment/helm/values.yaml similarity index 100% rename from helm/values.yaml rename to deployment/helm/values.yaml diff --git a/pyproject.toml b/pyproject.toml index e89f524..688f929 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [project] -name = "titiler" +name = "polder" description = "A simple web service to create maps and viewer using eoAPI" readme = "README.md" requires-python = ">=3.8" diff --git a/webapp/Dockerfile b/webapp/Dockerfile index 72e7011..2189b0f 100644 --- a/webapp/Dockerfile +++ b/webapp/Dockerfile @@ -1,7 +1,11 @@ -FROM node:alpine -WORKDIR /app +FROM node:20-alpine as build +WORKDIR /src RUN corepack enable && corepack prepare yarn@stable --activate -COPY package.json /app -RUN yarn install -COPY . /app -CMD ["yarn", "run", "start"] +COPY . . +RUN yarn install +RUN yarn build +RUN ls -la . + +FROM nginx:alpine +COPY --from=build /src/dist /usr/share/nginx/html +EXPOSE 8080 diff --git a/webapp/app/components/common/stressed-input.tsx b/webapp/app/components/common/stressed-input.tsx index 08f971f..01c0f9b 100644 --- a/webapp/app/components/common/stressed-input.tsx +++ b/webapp/app/components/common/stressed-input.tsx @@ -1,5 +1,6 @@ import React from 'react'; -import { Input, InputProps, keyframes } from '@chakra-ui/react'; +import { Input, InputProps } from '@chakra-ui/react'; +import { keyframes } from '@emotion/react'; import { StressedField,