forked from AnswerOverflow/AnswerOverflow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
55 lines (52 loc) · 1.2 KB
/
docker-compose.yml
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
version: '3.8'
services:
db-mysql:
container_name: ao-db-sql
image: mysql:8.0.31-oracle
command: mysqld --default-authentication-plugin=mysql_native_password
environment:
- MYSQL_USER=mysql
- MYSQL_PASSWORD=mysql
- MYSQL_ROOT_PASSWORD=mysql
- MYSQL_DATABASE=api_dev
expose:
- 3306
ports:
- 33306:3306
db-elastic:
container_name: ao-db-elastic
image: docker.elastic.co/elasticsearch/elasticsearch:8.0.1
environment:
- xpack.security.enabled=false
- "discovery.type=single-node"
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms1024m -Xmx1024m"
expose:
- 9200
- 9300
ports:
- 9200:9200
- 9300:9300
deploy:
resources:
limits:
memory: 2048m
reservations:
memory: 1024m
cache-redis:
container_name: ao-cache-redis
image: redis:alpine3.17
restart: always
command: redis-server --save 20 1 --loglevel warning --requirepass redis
expose:
- 6379
ports:
- 6379:6379
deploy:
resources:
limits:
cpus: '0.50'
memory: 50M
reservations:
cpus: '0.25'
memory: 20M