-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
83 lines (82 loc) · 2.34 KB
/
docker-compose.yml
File metadata and controls
83 lines (82 loc) · 2.34 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
version: '3.8'
services:
redis:
image: redis
ports:
- "6379:6379"
redis-commander:
image: rediscommander/redis-commander
ports:
- "8081:8081"
environment:
- REDIS_HOSTS=local:redis:6379
rabbitmq:
image: rabbitmq:management
ports:
- "5672:5672" # RabbitMQ main port
- "15672:15672" # Management UI
celery:
build:
context: ./celery_tasks
dockerfile: Dockerfile
depends_on:
- redis
environment:
CELERY_BROKER_URL: redis://redis:6379
CELERY_RESULT_BACKEND: redis://redis:6379
celery_rabbitmq:
build:
context: ./celery_rabbitmq
dockerfile: Dockerfile
depends_on:
- rabbitmq
- postgres
environment:
CELERY_RABBITMQ_BROKER_URL: amqp://guest:guest@rabbitmq:5672//
CELERY_RABBITMQ_RESULT_BACKEND: db+postgresql://myuser:mypassword@postgres:5432/mydb
# CELERY_RABBITMQ_BROKER_URL: amqp://guest:guest@rabbitmq:5672//
# CELERY_RABBITMQ_RESULT_BACKEND: rpc://
fast_api:
build:
context: ./fast_api
dockerfile: Dockerfile
ports:
- "5000:5000"
volumes:
- ./fast_api:/app/fast_api
depends_on:
- redis
- rabbitmq
environment:
CELERY_REDIS_BROKER_URL: redis://redis:6379
CELERY_REDIS_RESULT_BACKEND: redis://redis:6379
CELERY_RABBITMQ_BROKER_URL: amqp://guest:guest@rabbitmq:5672//
CELERY_RABBITMQ_RESULT_BACKEND: db+postgresql://myuser:mypassword@postgres:5432/mydb
# CELERY_RABBITMQ_BROKER_URL: amqp://guest:guest@rabbitmq:5672//
# CELERY_RABBITMQ_RESULT_BACKEND: rpc://
react_app:
build:
context: ./react_app
dockerfile: Dockerfile
ports:
- "3000:3000"
depends_on:
- fast_api
environment:
- REACT_APP_API_URL=http://localhost:5000
- CHOKIDAR_USEPOLLING=true # needed for hot reloading within containers on some systems
volumes:
- ./react_app/src:/app/src # Mount your local src directory to the container's /app/src
- ./react_app/public:/app/public # Mount your local public directory to the container's /app/public
postgres:
image: postgres:15
ports:
- "5432:5432"
environment:
POSTGRES_USER: myuser
POSTGRES_PASSWORD: mypassword
POSTGRES_DB: mydb
volumes:
- postgres_data:/var/lib/postgresql/data
volumes:
postgres_data: