-
-
Notifications
You must be signed in to change notification settings - Fork 338
/
docker-compose.test.yml
64 lines (64 loc) · 1.52 KB
/
docker-compose.test.yml
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
---
services:
test-db:
container_name: mathesar-test-db
extends:
file: docker-compose.dev.yml
service: dev-db-base
expose:
- "5432"
healthcheck:
interval: 1s
start_period: 2s
test-user-db:
container_name: mathesar-test-user-db
extends:
service: test-db
environment:
- POSTGRES_DB=my_data
- POSTGRES_USER=data_admin
- POSTGRES_PASSWORD=data1234
api-test-service:
container_name: mathesar-api-test-service
build:
context: .
target: testing
dockerfile: Dockerfile
args:
PYTHON_VERSION: ${PYTHON_VERSION-3.9-bookworm}
environment:
- ALLOWED_HOSTS=*
- DJANGO_SUPERUSER_PASSWORD=password
- POSTGRES_DB=mathesar_django
- POSTGRES_USER=mathesar
- POSTGRES_PASSWORD=mathesar
- POSTGRES_HOST=mathesar-test-db
- POSTGRES_PORT=5432
volumes:
- .:/code/
depends_on:
test-db:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "curl --fail http://localhost:8000/ || exit 1"]
interval: 1s
timeout: 1s
retries: 30
start_period: 3s
expose:
- "8000"
test-runner:
container_name: mathesar-api-test-runner
build:
context: api_tests
args:
PYTHON_VERSION: ${PYTHON_VERSION-3.9-bookworm}
depends_on:
api-test-service:
condition: service_healthy
test-user-db:
condition: service_healthy
volumes:
- ./api_tests/:/code/
volumes:
ui_node_modules_test: