-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.dev.yaml
70 lines (65 loc) · 1.37 KB
/
docker-compose.dev.yaml
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
version: '3.8'
services:
api:
env_file: .env
ports:
- '8000:8000'
volumes:
- ./app:/app
build:
context: .
dockerfile: Dockerfile.dev.app
command: bash -c "alembic upgrade head && uvicorn main:app --host 0.0.0.0 --port 8000 --reload"
depends_on:
database:
condition: service_healthy
celery:
condition: service_started
restart: always
celery:
env_file: .env
build:
context: .
dockerfile: Dockerfile.celery
environment:
TZ: Europe/Moscow
volumes:
- ./app:/app
depends_on:
rabbit:
condition: service_healthy
restart: always
rabbit:
env_file: .env
image: rabbitmq:3-alpine
expose:
- "5672"
environment:
TZ: Europe/Moscow
healthcheck:
test: rabbitmq-diagnostics -q ping
interval: 5s
timeout: 10s
retries: 10
restart: always
database:
env_file: .env
environment:
PGDATA: /var/lib/postgresql/data
POSTGRES_DB: related_users
POSTGRES_PASSWORD: password
POSTGRES_USER: postgres
image: postgres
expose:
- "5432"
healthcheck:
test: pg_isready -U postgres
interval: 5s
timeout: 10s
retries: 10
volumes:
- database_volume:/var/lib/postgresql/data
restart: always
volumes:
shared_volume:
database_volume: