-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.dev.yml
97 lines (90 loc) · 2.36 KB
/
docker-compose.dev.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
version: "3.8"
services:
just_chat:
build:
dockerfile: Dockerfile.dev
volumes:
- ./src/:/just_chat/src:ro
- ./alembic:/just_chat/alembic
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=192.168.0.216: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
rabbit:
condition: service_healthy
minio:
condition: service_started
redis:
condition: service_started
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: 20
mongo:
image: mongo:latest
restart: always
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"
redis:
image: redis:latest
environment:
- REDIS_PASSWORD="redis"
- REDIS_PORT=6379
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 $@