-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
148 lines (136 loc) · 3.07 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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# version: "0.0"
services:
server-app:
container_name: server-app
build:
context: ./server-app
command: uvicorn config.asgi:application --host 0.0.0.0 --port 8000 --workers 4 --log-level debug --reload
volumes:
- ./server-app:/usr/src/app
- $HOME/.cache/pip-docker/:/root/.cache/pip
env_file:
- ./env-vars/server-app.txt # you should create this file
ports:
- 8000:8000
networks:
- postgres
- redisnet
- rabbitnet
- mongonet
# depends_on:
# - redis
rabbitmq:
container_name: rabbitmq
image: rabbitmq:management
restart: always
ports:
- 5672:5672
- 15672:15672
networks:
- rabbitnet
redis:
image: redis:7.0.11-alpine
ports:
- "6379:6379"
networks:
- redisnet
flower:
image: mher/flower
restart: always
ports:
- 5555:5555
environment:
- CELERY_BROKER_URL=amqp://guest:guest@rabbitmq:5672/
networks:
- rabbitnet
celery-worker:
container_name: celery-worker
build:
context: ./server-app
command: celery --app=config worker -l INFO -B
volumes:
- ./server-app:/usr/src/app
- $HOME/.cache/pip-docker/:/root/.cache/pip
env_file:
- ./env-vars/server-app.txt # you should create this file
networks:
- postgres
- redisnet
- rabbitnet
- mongonet
########################################################################### postgres
db:
image: postgres
container_name: postgres
restart: always
ports:
- "5434:5432"
environment:
POSTGRES_USER: abbas
POSTGRES_PASSWORD: 1
volumes:
- pg_data:/var/lib/postgresql/data
networks:
- postgres
pgadmin:
image: dpage/pgadmin4
container_name: pgadmin
restart: always
ports:
- "8888:80"
environment:
PGADMIN_DEFAULT_USERNAME: abbas
PGADMIN_DEFAULT_EMAIL: [email protected]
PGADMIN_DEFAULT_PASSWORD: 1
volumes:
- pgadmin_data:/var/lib/pgadmin
networks:
- postgres
########################################################################### end postgres
mongodb:
container_name: mongo
image: mongo:latest
restart: unless-stopped
environment:
MONGO_INITDB_ROOT_USERNAME: abbas
MONGO_INITDB_ROOT_PASSWORD: 1
ports:
- "27017:27017"
volumes:
- mongo_data:/data/db
networks:
- mongonet
mongo-express:
container_name: mongo_express
image: mongo-express
restart: unless-stopped
ports:
- "8081:8081"
environment:
ME_CONFIG_MONGODB_ADMINUSERNAME: abbas
ME_CONFIG_MONGODB_ADMINPASSWORD: 1
ME_CONFIG_MONGODB_ENABLE_ADMIN: "true"
ME_CONFIG_MONGODB_SERVER: mongo
ME_CONFIG_MONGODB_PORT: 27017
depends_on:
- mongodb
networks:
- mongonet
networks:
elk:
driver: bridge
postgres:
driver: bridge
redisnet:
driver: bridge
rabbitnet:
driver: bridge
mongonet:
driver: bridge
volumes:
test_data:
ls_data:
kb_data:
pg_data:
pgadmin_data:
mongo_data: