41 lines
708 B
YAML
41 lines
708 B
YAML
|
version: "3.8"
|
||
|
services:
|
||
|
redis:
|
||
|
container_name: redis_tests
|
||
|
|
||
|
image: redis:7.2.4-alpine3.19
|
||
|
|
||
|
ports:
|
||
|
- '6381:6379'
|
||
|
|
||
|
healthcheck:
|
||
|
test: [ "CMD", "redis-cli","ping" ]
|
||
|
interval: 6s
|
||
|
timeout: 6s
|
||
|
retries: 5
|
||
|
|
||
|
app:
|
||
|
container_name: flask_tests
|
||
|
|
||
|
environment:
|
||
|
REDISURL: "redis://redis:6379/0"
|
||
|
|
||
|
build:
|
||
|
context: .
|
||
|
dockerfile: ./docker/tests/Dockerfile
|
||
|
|
||
|
ports:
|
||
|
- 8080:5000
|
||
|
|
||
|
depends_on:
|
||
|
redis:
|
||
|
condition: service_healthy
|
||
|
|
||
|
restart: always
|
||
|
|
||
|
volumes:
|
||
|
- ./flask_demo_api:/usr/src/flask-demo-api/flask_demo_api
|
||
|
- ./tests:/usr/src/flask-demo-api/tests
|
||
|
|
||
|
command: /bin/bash -c 'poetry run pytest -vv'
|