-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose-tests.yml
More file actions
115 lines (109 loc) · 3.09 KB
/
Copy pathdocker-compose-tests.yml
File metadata and controls
115 lines (109 loc) · 3.09 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
services:
db:
image: postgres:16
container_name: postgres_theater_test
environment:
POSTGRES_DB: theater_test
POSTGRES_USER: theater
POSTGRES_PASSWORD: theater
volumes:
- postgres_theater_test_data:/var/lib/postgresql/data
networks:
- theater_network_test
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB -h 127.0.0.1 || exit 1"]
interval: 10s
timeout: 5s
retries: 10
start_period: 10s
mailhog:
image: mailhog/mailhog:latest
container_name: mailhog_theater_test
networks:
- theater_network_test
minio:
image: minio/minio:latest
container_name: minio-theater-test
command: server --console-address ":9001" /data
environment:
MINIO_ROOT_USER: minioadmin
MINIO_ROOT_PASSWORD: some_password
volumes:
- minio_data_test:/data
networks:
- theater_network_test
healthcheck:
test: [ "CMD-SHELL", "curl -f http://localhost:9000/minio/health/live || exit 1" ]
interval: 10s
timeout: 5s
retries: 10
minio_mc:
build:
context: .
dockerfile: docker/minio_mc/Dockerfile
container_name: minio_mc_theater_test
command: [ "/bin/sh", "-c", "/commands/setup_minio.sh && tail -f /dev/null" ]
depends_on:
minio:
condition: service_healthy
environment:
MINIO_ROOT_USER: minioadmin
MINIO_ROOT_PASSWORD: some_password
MINIO_HOST: minio
MINIO_PORT: 9000
MINIO_STORAGE: theater-storage
networks:
- theater_network_test
healthcheck:
test: [ "CMD-SHELL", "test -f /tmp/minio_ready" ]
interval: 2s
timeout: 2s
retries: 60
web:
build:
context: .
dockerfile: ./docker/tests/Dockerfile
container_name: backend_theater_test
command: [ "pytest", "-c", "/usr/src/config/pytest.ini", "--maxfail=5", "--disable-warnings", "-v", "--tb=short" ]
environment:
- PYTHONPATH=/usr/src/app
- ENVIRONMENT=testing
- DATABASE_URL=postgresql+asyncpg://theater:theater@db:5432/theater_test
- EMAIL_HOST=mailhog
- EMAIL_PORT=1025
- EMAIL_HOST_USER=testuser@mate.com
- EMAIL_HOST_PASSWORD=test_password
- EMAIL_USE_TLS=False
- EMAIL_FROM=testuser@mate.com
- MAILHOG_API_PORT=8025
- MINIO_ROOT_USER=minioadmin
- MINIO_ROOT_PASSWORD=some_password
- MINIO_HOST=minio
- MINIO_PORT=9000
- MINIO_STORAGE=theater-storage
- SMTP_HOST=mailhog
- SMTP_PORT=1025
- SMTP_USE_TLS=False
- SMTP_EMAIL=noreply@theater.test
- SMTP_PASSWORD=
depends_on:
db:
condition: service_healthy
mailhog:
condition: service_started
minio:
condition: service_healthy
minio_mc:
condition: service_healthy
volumes:
- .:/usr/src/app
networks:
- theater_network_test
volumes:
postgres_theater_test_data:
driver: local
minio_data_test:
driver: local
networks:
theater_network_test:
driver: bridge