-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.test.yml
46 lines (45 loc) · 1.08 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
services:
test:
profiles: [test]
image: "${IMAGE_NAME}:${IMAGE_TAG}"
command:
- sh
- -cx
- |
alembic downgrade base &&
alembic upgrade head &&
python -m pytest &&
python -m coverage xml &&
python -m coverage html
environment:
- DB_HOST=db-test
- DB_PORT=5432
- AWS_DEFAULT_REGION=us-east-1
- AWS_ENDPOINT_URL=http://queue:9324
volumes:
- ./tests:/code/tests
depends_on:
db-test:
condition: service_healthy
db-test:
profiles: [test]
image: postgres:16-alpine
environment:
- POSTGRES_USER=accounting_service
- POSTGRES_PASSWORD=accounting_service
ports:
- "127.0.0.1:5434:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER"]
interval: 10s
timeout: 5s
retries: 3
start_period: 5s
start_interval: 1s
restart: "no"
command: # see https://www.postgresql.org/docs/current/non-durability.html
- postgres
- -cfsync=off
- -csynchronous_commit=off
- -cfull_page_writes=off
# - -clog_statement=all