🐳 chore(docker-compose.yml): refactor backend service to use YAML anchors and aliases for code reuse
🚀 feat(docker-compose.yml): add tests service to run pytest with coverage and generate reports
This commit is contained in:
parent
f5f89eb8b8
commit
e9fd9b097f
1 changed files with 14 additions and 3 deletions
|
|
@ -68,7 +68,7 @@ services:
|
||||||
# to disable www redirection remove the section: ${STACK_NAME?Variable not set}-www-redirect,
|
# 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
|
- 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"
|
image: "ogabrielluiz/langflow:latest"
|
||||||
build:
|
build:
|
||||||
context: ../
|
context: ../
|
||||||
|
|
@ -136,7 +136,7 @@ services:
|
||||||
test: "exit 0"
|
test: "exit 0"
|
||||||
|
|
||||||
celeryworker:
|
celeryworker:
|
||||||
image: "ogabrielluiz/langflow:latest"
|
<<: *backend
|
||||||
env_file:
|
env_file:
|
||||||
- .env
|
- .env
|
||||||
build:
|
build:
|
||||||
|
|
@ -149,7 +149,7 @@ services:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
|
|
||||||
flower:
|
flower:
|
||||||
image: "ogabrielluiz/langflow:latest"
|
<<: *backend
|
||||||
env_file:
|
env_file:
|
||||||
- .env
|
- .env
|
||||||
networks:
|
networks:
|
||||||
|
|
@ -227,6 +227,17 @@ services:
|
||||||
- traefik.http.routers.${STACK_NAME?Variable not set}-grafana-http.rule=PathPrefix(`/grafana`)
|
- 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
|
- 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:
|
volumes:
|
||||||
grafana_data:
|
grafana_data:
|
||||||
app-db-data:
|
app-db-data:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue