-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.tests.yml
More file actions
43 lines (41 loc) · 1019 Bytes
/
docker-compose.tests.yml
File metadata and controls
43 lines (41 loc) · 1019 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
networks:
colocus-test-network:
driver: bridge
services:
db:
image: postgres:18
env_file: "envs/env.test"
volumes:
- type: tmpfs
target: /var/lib/postgresql
- ./bin/init-postgres.sh:/docker-entrypoint-initdb.d/init-db.sh
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER}"]
interval: 5s
timeout: 5s
retries: 5
networks:
- colocus-test-network
django:
build: .
env_file: "envs/env.test"
volumes:
- "./colocus/tests/data/:/data:ro"
ports:
- "${UVICORN_PORT}:${UVICORN_PORT}"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:${UVICORN_PORT}/api/v1/datasets/?page_size=1"]
interval: 5s
timeout: 5s
retries: 5
depends_on:
db:
condition: service_healthy
networks:
- colocus-test-network
entrypoint: >
/bin/bash -c '
cp envs/env.test .env &&
bin/entrypoint-migrate-and-load.sh &&
uv run pytest
'