Skip to content

Commit

Permalink
added README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
nico-iaco committed Oct 7, 2022
1 parent 1570334 commit b405655
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 22 deletions.
30 changes: 8 additions & 22 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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 }}
cache-to: type=gha,mode=max
41 changes: 41 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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 | |

0 comments on commit b405655

Please sign in to comment.