-
Notifications
You must be signed in to change notification settings - Fork 0
/
tests.yml
98 lines (91 loc) · 2.44 KB
/
tests.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
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
version: "3.8"
services:
just_chat_tests:
build:
dockerfile: Dockerfile.dev
volumes:
- ./src/:/just_chat/src:ro
- ./alembic:/just_chat/alembic
- ./tests:/just_chat/tests
environment:
- REDIS_HOST=redis
- REDIS_PORT=6379
- RABBIT_URL=amqp://user:password@rabbit:5672/
- POSTGRES_DSN=postgresql://postgres:postgres@postgres:5432/postgres
- MONGO_DSN=mongodb://mongo:27017/just_chat
- MINIO_ENDPOINT=minio:9000
- MINIO_ACCESS_KEY=test
- MINIO_SECRET_KEY=testsecret
ports:
- "8000:8000"
depends_on:
notification_service:
condition: service_started
postgres:
condition: service_healthy
mongo:
condition: service_started
minio:
condition: service_started
redis:
condition: service_started
entrypoint: bash -c "alembic upgrade head && pytest -vvv -s"
notification_service:
build:
dockerfile: Dockerfile.dev
volumes:
- ./src/:/just_chat/src:ro
environment:
- REDIS_HOST=redis
- REDIS_PORT=6379
- RABBIT_URL=amqp://user:password@rabbit:5672/
- POSTGRES_DSN=postgresql://postgres:postgres@postgres:5432/postgres
ports:
- "8001:8001"
depends_on:
rabbit:
condition: service_healthy
entrypoint: gunicorn -b 0.0.0.0:8001 -k uvicorn.workers.UvicornWorker notification_service.main:app --reload
postgres:
image: postgres:latest
environment:
POSTGRES_USER: "postgres"
POSTGRES_PASSWORD: "postgres"
healthcheck:
test: ["CMD-SHELL", "pg_isready -d postgres -U postgres"]
interval: 1s
timeout: 1s
retries: 5
mongo:
image: mongo:latest
restart: always
redis:
image: redis:latest
environment:
- REDIS_PASSWORD="redis"
- REDIS_PORT=6379
minio:
hostname: minio
image: quay.io/minio/minio:latest
environment:
- MINIO_ACCESS_KEY=test
- MINIO_SECRET_KEY=testsecret
volumes:
- ./minio/data:/data
ports:
- "9000:9000"
- "9001:9001"
entrypoint: bash -c "
mkdir -p /data/images &&
minio server --console-address ":9001" /data"
rabbit:
image: bitnami/rabbitmq
environment:
RABBITMQ_DEFAULT_PASS: password
RABBITMQ_DEFAULT_USER: user
healthcheck:
test: rabbitmq-diagnostics -q ping
interval: 30s
timeout: 30s
retries: 3
entrypoint: rabbitmq-server $@