fastfood/compose_test.yml

46 lines
764 B
YAML
Raw Normal View History

2024-01-30 23:11:40 +03:00
version: "3.8"
services:
db:
container_name: pgdb_test
image: postgres:15.1-alpine
env_file:
- .env
environment:
2024-01-31 01:05:28 +03:00
POSTGRES_DB: ${POSTGRES_DB_TEST}
2024-01-30 23:11:40 +03:00
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
ports:
- 6432:5432
healthcheck:
2024-01-31 01:05:28 +03:00
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB_TEST}"]
2024-01-30 23:11:40 +03:00
interval: 10s
timeout: 5s
retries: 5
app:
container_name: fastfood_app_test
build:
context: .
env_file:
- .env
ports:
- 8000:8000
depends_on:
db:
condition: service_healthy
restart: always
command: /bin/bash -c 'poetry run pytest -vv'