Skip to content

Commit

Permalink
ET-5231 Update image generation for unified WebApi
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucas Jenss committed Dec 4, 2023
1 parent 9f10f50 commit 4cd226c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 58 deletions.
43 changes: 11 additions & 32 deletions .github/workflows/web-service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ env:
DENY_WARNINGS: false
runtime_name: ort
runtime_version: v1.15.1
frontoffice_archive: web-service-frontoffice
backoffice_archive: web-service-backoffice
web_api_archive: web-service-api

jobs:
services-build:
Expand Down Expand Up @@ -75,21 +74,12 @@ jobs:
${{ inputs.model_name }} ${{ inputs.model_version }} \
${{ env.runtime_name }} ${{ env.runtime_version }}

- name: Create backoffice artifact
- name: Create web-api artifact
uses: ./.github/actions/release_artifact
with:
platform: ${{ inputs.platform }}
bin_name: "ingestion"
archive_name: ${{ env.backoffice_archive }}
model_full_name: ${{ inputs.model_name }}_${{ inputs.model_version }}
runtime_full_name: ${{ env.runtime_name }}_${{ env.runtime_version }}

- name: Create frontoffice artifact
uses: ./.github/actions/release_artifact
with:
platform: ${{ inputs.platform }}
bin_name: "personalization"
archive_name: ${{ env.frontoffice_archive }}
bin_name: "web-api"
archive_name: ${{ env.web_api_archive }}
model_full_name: ${{ inputs.model_name }}_${{ inputs.model_version }}
runtime_full_name: ${{ env.runtime_name }}_${{ env.runtime_version }}

Expand Down Expand Up @@ -120,30 +110,20 @@ jobs:
TAG="$TAG-${{ inputs.model_name }}_${{ inputs.model_version }}"
TAG="$TAG-${{ inputs.platform }}"
fi
frontoffice_image_name="xaynetci/xayn_discovery_web_service:$TAG"
backoffice_image_name="xaynetci/xayn_discovery_ingestion_service:$TAG"
echo "frontoffice_image_name=$frontoffice_image_name" >> $GITHUB_ENV
echo "backoffice_image_name=$backoffice_image_name" >> $GITHUB_ENV
webapi_image_name="xaynetci/xayn_discovery_web_service:$TAG"
echo "webapi_image_name=$webapi_image_name" >> $GITHUB_ENV
cat <<EOT >>${GITHUB_STEP_SUMMARY}
# Image names
Back-office: $frontoffice_image_name
Front-office: $backoffice_image_name
WebApi: $webapi_image_name
EOT
- name: Create backoffice docker image
uses: ./.github/actions/release_image
with:
archive_name: ${{ env.backoffice_archive }}
image_name: ${{ env.backoffice_image_name }}
platform: ${{ inputs.platform }}

- name: Create frontoffice docker image
- name: Create web API docker image
uses: ./.github/actions/release_image
with:
archive_name: ${{ env.frontoffice_archive }}
image_name: ${{ env.frontoffice_image_name }}
archive_name: ${{ env.web_api_archive }}
image_name: ${{ env.webapi_image_name }}
platform: ${{ inputs.platform }}

- name: Login to Docker Hub
Expand All @@ -155,5 +135,4 @@ jobs:
- name: Push images
run: |
set -eux
docker push ${{ env.frontoffice_image_name }}
docker push ${{ env.backoffice_image_name }}
docker push ${{ env.webapi_image_name }}
28 changes: 2 additions & 26 deletions web-api/compose.single-machine-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ services:
timeout: 5s
retries: 5

backoffice:
image: xaynetci/xayn_discovery_ingestion_service:main-231019104503-d06d92c-e5_small_v2_v0001-amd64
webapi:
image: xaynetci/xayn_discovery_web_service:ET-5231-update-image-generation-231204120506-693e23c-xaynia_v0201-arm64
mem_limit: 1.5g
cpus: 2
restart: always
Expand All @@ -63,30 +63,6 @@ services:
db_ready:
condition: service_completed_successfully

frontoffice:
image: xaynetci/xayn_discovery_web_service:main-231019104503-d06d92c-e5_small_v2_v0001-amd64
mem_limit: 1.5g
cpus: 2
restart: always
environment:
XAYN_WEB_API__STORAGE__POSTGRES__BASE_URL: "postgres://${POSTGRES_USER:-user}:${POSTGRES_PASSWORD:-pw}@postgres:5432/xayn"
XAYN_WEB_API__STORAGE__ELASTIC__URL: "http://elasticsearch:9200/"
XAYN_WEB_API__NET__BIND_TO: "0.0.0.0:8082"
XAYN_WEB_API__STORAGE__POSTGRES__USER: "${POSTGRES_USER:-user}"
XAYN_WEB_API__STORAGE__POSTGRES__PASSWORD: "${POSTGRES_PASSWORD:-pw}"
XAYN_WEB_API__STORAGE__POSTGRES__APPLICATION_NAME: "xayn"
XAYN_WEB_API__EMBEDDING__TOKEN_SIZE: "512"
XAYN_WEB_API__STORAGE__ELASTIC__USER: "elastic"
XAYN_WEB_API__EMBEDDING__TYPE: "pipeline"
XAYN_WEB_API__STORAGE__ELASTIC__INDEX_NAME: "xayn"
ports:
- "8082:8082"
networks:
- internal
depends_on:
db_ready:
condition: service_completed_successfully

tika:
image: apache/tika:2.8.0.0-full
mem_limit: 512m
Expand Down

0 comments on commit 4cd226c

Please sign in to comment.