From e9fd9b097fd7d5d8e6febe2554edd95fdcd06be6 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Sat, 16 Sep 2023 00:05:26 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=B3=20chore(docker-compose.yml):=20ref?= =?UTF-8?q?actor=20backend=20service=20to=20use=20YAML=20anchors=20and=20a?= =?UTF-8?q?liases=20for=20code=20reuse=20=F0=9F=9A=80=20feat(docker-compos?= =?UTF-8?q?e.yml):=20add=20tests=20service=20to=20run=20pytest=20with=20co?= =?UTF-8?q?verage=20and=20generate=20reports?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deploy/docker-compose.yml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/deploy/docker-compose.yml b/deploy/docker-compose.yml index c6a9db73c..e8b999dc7 100644 --- a/deploy/docker-compose.yml +++ b/deploy/docker-compose.yml @@ -68,7 +68,7 @@ services: # to disable www redirection remove the section: ${STACK_NAME?Variable not set}-www-redirect, - traefik.http.routers.${STACK_NAME?Variable not set}-proxy-http.middlewares=${STACK_NAME?Variable not set}-www-redirect,${STACK_NAME?Variable not set}-https-redirect - backend: + backend: &backend image: "ogabrielluiz/langflow:latest" build: context: ../ @@ -136,7 +136,7 @@ services: test: "exit 0" celeryworker: - image: "ogabrielluiz/langflow:latest" + <<: *backend env_file: - .env build: @@ -149,7 +149,7 @@ services: replicas: 1 flower: - image: "ogabrielluiz/langflow:latest" + <<: *backend env_file: - .env networks: @@ -227,6 +227,17 @@ services: - traefik.http.routers.${STACK_NAME?Variable not set}-grafana-http.rule=PathPrefix(`/grafana`) - traefik.http.services.${STACK_NAME?Variable not set}-grafana.loadbalancer.server.port=3000 + tests: + <<: *backend + env_file: + - .env + build: + context: ../ + dockerfile: base.Dockerfile + command: pytest -v --cov=langflow --cov-report=term-missing --cov-report=xml --cov-report=html -m async_test + healthcheck: + test: "exit 0" + volumes: grafana_data: app-db-data: