-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathdocker-compose-test.yml
More file actions
64 lines (61 loc) · 1.61 KB
/
docker-compose-test.yml
File metadata and controls
64 lines (61 loc) · 1.61 KB
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:
postgres:
container_name: postgres
image: 'postgis/postgis:15-3.3'
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=bayanat_test
volumes:
- 'postgres_test_data:/var/lib/postgresql/data:rw'
expose:
- '5432'
read_only: true
security_opt:
- no-new-privileges:true
tmpfs:
- /var/run/postgresql
healthcheck:
test: "pg_isready -d bayanat_test -U ${POSTGRES_USER}"
interval: 3s
retries: 10
redis:
container_name: redis
image: 'redis:latest'
expose:
- '6379'
command: redis-server --requirepass '${REDIS_PASSWORD}'
read_only: true
security_opt:
- no-new-privileges:true
volumes:
- 'redis_test_data:/var/lib/redis/data:rw'
healthcheck:
test: [ "CMD", "redis-cli", "--no-auth-warning", "-a", "${REDIS_PASSWORD}", "ping" ]
interval: 3s
retries: 10
bayanat:
container_name: bayanat
build:
context: .
dockerfile: ./flask/Dockerfile.test
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
ports:
- '127.0.0.1:5000:5000'
volumes:
- '${PWD}/reload.ini:/app/reload.ini:rw'
- '${PWD}/${ENV_FILE:-.env.test}:/app/.env:ro'
- 'bayanat_test_media:/app/enferno/media:rw'
- 'bayanat_test_imports:/app/tests/imports:rw'
- 'bayanat_test_logs:/app/logs:rw'
command: [ "uv", "run", "pytest" ]
volumes:
redis_test_data:
postgres_test_data:
bayanat_test_media:
bayanat_test_imports:
bayanat_test_logs: