forked from jitendrasinghiitg/docker-fastapi-celery
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
40 lines (38 loc) · 954 Bytes
/
Copy pathdocker-compose.yml
File metadata and controls
40 lines (38 loc) · 954 Bytes
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
# version: "3.7" # 版本声明已过时,注释掉以避免警告
services:
fastapi:
build:
context: .
dockerfile: DockerfileWebApi
environment:
REDISSERVER: redis://redis_server:6379
C_FORCE_ROOT: "true"
ports:
- "8000:80"
depends_on:
- redis_server
worker:
build:
dockerfile: DockerfileCelery
context: .
environment:
REDISSERVER: redis://redis_server:6379
C_FORCE_ROOT: "true"
depends_on:
- redis_server
redis_server:
image: docker.m.daocloud.io/library/redis:latest
ports:
- "6379:6379"
flower:
build:
dockerfile: DockerfileCelery
context: .
command: ["celery", "-A", "tasks", "flower", "--broker=redis://redis_server:6379", "--port=5555", "--address=0.0.0.0"]
ports:
- "5555:5555"
depends_on:
- redis_server
environment:
REDISSERVER: redis://redis_server:6379
entrypoint: []