-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.test.yml
46 lines (44 loc) · 991 Bytes
/
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:
testdb:
image: mysql:8.0
platform: linux/amd64
command: --default-authentication-plugin=caching_sha2_password
volumes:
- ./db/my.cnf:/etc/mysql/conf.d/my.cnf:cached
- ./log/db:/var/log/mysql:cached
tty: true
ports:
- "3307:3306"
env_file: .env.test
healthcheck:
test: ["CMD", "mysql", "-uroot", "-ppassword", "-e", "SELECT 1"]
interval: 20s
timeout: 5s
retries: 10
networks:
- trial_network
test:
build:
context: .
dockerfile: Dockerfile.test
depends_on:
testdb:
condition: service_healthy
volumes:
- ./src:/app:cached
- ./db:/db:cached
- ./tests:/tests:cached
- ./tests/htmlcov:/app/htmlcov
environment:
- PYTHONPATH=/app
- TZ=Asia/Tokyo
env_file: .env.test
restart: no
networks:
- trial_network
networks:
default:
name: bridge
trial_network:
name: trial_network
driver: bridge