diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index a64fbd6..9bd2fc0 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -12,6 +12,13 @@ on: tags: [ 'v*.*.*' ] paths-ignore: - 'k8s/**' + - 'docs/**' + - 'README.md' + - 'LICENSE' + - 'CHANGELOG.md' + - 'CODE_OF_CONDUCT.md' + - 'CONTRIBUTING.md' + - 'SECURITY.md' env: # Use docker.io for Docker Hub if empty @@ -35,14 +42,6 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 - # Install the cosign tool except on PR - # https://github.com/sigstore/cosign-installer - - name: Install cosign - if: github.event_name != 'pull_request' - uses: sigstore/cosign-installer@7e0881f8fe90b25e305bbf0309761e9314607e25 - with: - cosign-release: 'v1.9.0' - # Workaround: https://github.com/docker/build-push-action/issues/461 - name: Setup Docker buildx @@ -88,17 +87,4 @@ jobs: tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha - cache-to: type=gha,mode=max - - # Sign the resulting Docker image digest except on PRs. - # This will only write to the public Rekor transparency log when the Docker - # repository is public to avoid leaking data. If you would like to publish - # transparency data even for private images, pass --force to cosign below. - # https://github.com/sigstore/cosign - - name: Sign the published Docker image - if: ${{ github.event_name != 'pull_request' }} - env: - COSIGN_EXPERIMENTAL: "true" - # This step uses the identity token to provision an ephemeral certificate - # against the sigstore community Fulcio instance. - run: echo "${{ steps.meta.outputs.tags }}" | xargs -I {} cosign sign {}@${{ steps.build-and-push.outputs.digest }} \ No newline at end of file + cache-to: type=gha,mode=max \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..808c650 --- /dev/null +++ b/README.md @@ -0,0 +1,41 @@ +# Food-detail-integrator-be + +## Description +This little microservice is used to integrate food details from [openFoodFacts](https://world.openfoodfacts.org/). It is used by [food-track-be](https://github.com/nico-iaco/food-track-be) and [grocery-be](https://github.com/nico-iaco/grocery-be). + +## Features + +- [x] Integrate food details from openFoodFacts +- [x] Calculate kcal per quantity consumed + +## Requirements + +- [Redis](https://redis.io/) + +## Installation + +### Cluster installation + +To install this app in a cluster, first create grocery namespace, then modify the kustomization.yaml file in /k8s/overlays/qa +changing the property to match your configuration and run the following command: + +```bash +kubectl apply -k k8s/overlays/qa +``` + +### Local installation + +You can run this app locally with docker. To do so, run the following command: + +```bash +docker run -p 8080:8080 ghcr.io/nico-iaco/food-detail-integrator-be:latest -e {ALL_ENV_VARIABLES} +``` + +## Environment variables + +| Name | Description | Default value | +|-----------|----------------------------------------------|---------------| +| PORT | Port on which the app will listen | 8080 | +| GIN_MODE | Release type of app | | +| REDIS_URL | Redis host | | +