-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yaml
130 lines (119 loc) · 3.35 KB
/
docker-compose.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
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
version: '3.8'
services:
docker-daemon:
image: docker:dind
container_name: docker-daemon
environment:
DOCKER_TLS_CERTDIR: ""
networks:
docker-net:
aliases:
- docker
privileged: true
redis:
image: redis:7.0.0-alpine
container_name: redis
ports:
- "6379:6379"
networks:
docker-net: { }
rabbitmq:
image: rabbitmq:management
container_name: rabbitmq
environment:
RABBITMQ_DEFAULT_USER: user
RABBITMQ_DEFAULT_PASS: pwd
ports:
- "5672:5672"
- "15672:15672"
networks:
docker-net: { }
web:
build: .
container_name: docker_rest_app-server
ports:
- "8080:8080"
command: python docker_rest_app/__main__.py
environment:
# - CELERY_BROKER_URL=redis://redis:6379/0
- CELERY_BROKER_URL=amqp://user:pwd@rabbitmq:5672/
- CELERY_RESULT_BACKEND=redis://redis:6379/1
- DOCKER_HOST=tcp://docker:2375
depends_on:
- redis
- rabbitmq
networks:
docker-net: { }
celery-worker-1:
build: .
container_name: celery-worker-1
privileged: true
command: python docker_rest_app/celery_app/__main__.py TUX-Polaris@worker-1
environment:
# - CELERY_BROKER_URL=redis://redis:6379/0
- CELERY_BROKER_URL=amqp://user:pwd@rabbitmq:5672/
- CELERY_RESULT_BACKEND=redis://redis:6379/1
- DOCKER_REGISTRY_URL=ghcr.io/abdulmateen59/async-docker-rest-app
- DOCKER_REGISTRY_USERNAME=abdulmateen59
- DOCKER_REGISTRY_PASSWORD=iAmDummytokenReplaceMe
- DOCKER_HOST=tcp://docker:2375
depends_on:
- redis
- rabbitmq
networks:
docker-net: { }
celery-worker-2:
build: .
container_name: celery-worker-2
privileged: true
command: python docker_rest_app/celery_app/__main__.py TUX-Polaris@worker-2
environment:
# - CELERY_BROKER_URL=redis://redis:6379/0
- CELERY_BROKER_URL=amqp://user:pwd@rabbitmq:5672/
- CELERY_RESULT_BACKEND=redis://redis:6379/1
- DOCKER_REGISTRY_URL=ghcr.io/abdulmateen59/async-docker-rest-app
- DOCKER_REGISTRY_USERNAME=abdulmateen59
- DOCKER_REGISTRY_PASSWORD=iAmDummytokenReplaceMe
- DOCKER_HOST=tcp://docker:2375
depends_on:
- redis
- rabbitmq
networks:
docker-net: { }
celery-beat:
build: .
container_name: celery-beat
privileged: true
command: celery --app=docker_rest_app.celery_app beat -l info
environment:
# - CELERY_BROKER_URL=redis://redis:6379/0
- CELERY_BROKER_URL=amqp://user:pwd@rabbitmq:5672/
- CELERY_RESULT_BACKEND=redis://redis:6379/1
- DOCKER_HOST=tcp://docker:2375
depends_on:
- redis
- rabbitmq
networks:
docker-net: { }
dashboard:
build: .
container_name: dashboard
command: >
sh -c "sleep 03 &&
celery --app=docker_rest_app.celery_app flower --port=5555 --broker=amqp://user:pwd@rabbitmq:5672/ --broker_api=http://user:pwd@rabbitmq:15672/api/"
ports:
- "5555:5555"
environment:
# - CELERY_BROKER_URL=redis://redis:6379/0
- CELERY_BROKER_URL=amqp://user:pwd@rabbitmq:5672/
- CELERY_RESULT_BACKEND=redis://redis:6379/1
depends_on:
- celery-worker-1
- celery-worker-2
- rabbitmq
- redis
networks:
docker-net: { }
networks:
docker-net:
name: docker-net