flask-demo-api/compose-tests.yml

41 lines
708 B
YAML
Raw Normal View History

2024-04-15 04:02:47 +03:00
version: "3.8"
services:
redis:
2024-04-16 04:48:10 +03:00
container_name: redis_tests
2024-04-15 04:02:47 +03:00
image: redis:7.2.4-alpine3.19
ports:
2024-04-16 04:48:10 +03:00
- '6381:6379'
2024-04-15 04:02:47 +03:00
healthcheck:
test: [ "CMD", "redis-cli","ping" ]
2024-04-16 04:48:10 +03:00
interval: 6s
timeout: 6s
2024-04-15 04:02:47 +03:00
retries: 5
app:
2024-04-16 04:48:10 +03:00
container_name: flask_tests
environment:
REDISURL: "redis://redis:6379/0"
2024-04-15 04:02:47 +03:00
build:
context: .
2024-04-16 04:48:10 +03:00
dockerfile: ./docker/tests/Dockerfile
2024-04-15 04:02:47 +03:00
ports:
- 8080:5000
depends_on:
redis:
condition: service_healthy
restart: always
volumes:
- ./flask_demo_api:/usr/src/flask-demo-api/flask_demo_api
2024-04-16 04:48:10 +03:00
- ./tests:/usr/src/flask-demo-api/tests
2024-04-15 04:02:47 +03:00
2024-04-16 04:48:10 +03:00
command: /bin/bash -c 'poetry run pytest -vv'