-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
130 lines (130 loc) · 3.99 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
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
services:
# postgres
postgres:
image: postgres:17
container_name: postgres
restart: always
environment:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_PORT: ${POSTGRES_PORT}
POSTGRES_USER: ${POSTGRES_USER}
ports:
- ${POSTGRES_PORT}:5432
graphql-engine:
image: hasura/graphql-engine:latest
container_name: hasura
restart: always
ports:
- ${HASURA_PORT}:8080
depends_on:
- postgres
environment:
HASURA_GRAPHQL_DATABASE_URL: postgres://postgres:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}
HASURA_GRAPHQL_ENABLE_CONSOLE: "true"
HASURA_GRAPHQL_DEV_MODE: "true"
HASURA_GRAPHQL_ADMIN_SECRET: myadminsecretkey
HASURA_GRAPHQL_UNAUTHORIZED_ROLE: anonymous
# mongo
mongo:
image: mongo
container_name: mongo
environment:
MONGO_INITDB_ROOT_USERNAME: ${MONGODB_USER}
MONGO_INITDB_ROOT_PASSWORD: ${MONGODB_PW}
ports:
- ${MONGODB_PORT}:27017
mongo-express:
image: mongo-express:latest
container_name: mongo-express
depends_on:
- mongo
environment:
ME_CONFIG_MONGODB_SERVER: mongo
ME_CONFIG_MONGODB_PORT: 27017
ME_CONFIG_MONGODB_ENABLE_ADMIN: "true"
ME_CONFIG_MONGODB_ADMINUSERNAME: ${MONGODB_USER}
ME_CONFIG_MONGODB_ADMINPASSWORD: ${MONGODB_PW}
ports:
- ${MONGOEXPRESS_PORT}:8081
# redis
redis:
container_name: redis
image: redis
restart: always
ports:
- "${REDIS_PORT}:6379"
environment:
- REDIS_PASSWORD=${REDIS_PASSWORD}
command: redis-server --requirepass $REDIS_PASSWORD
redis-commander:
container_name: redis-commander
image: rediscommander/redis-commander
restart: always
ports:
- "${REDIS_COMMANDER_PORT}:8081"
depends_on:
- redis
environment:
- REDIS_HOST=${REDIS_HOST}
- REDIS_PASSWORD=${REDIS_PASSWORD}
- REDIS_PORT=${REDIS_PORT}
- HTTP_USER=${REDIS_COMMANDER_USER}
- HTTP_PASSWORD=${REDIS_COMMANDER_PASSWORD}
# elasticsearch
es01:
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.6
container_name: es01
environment:
- discovery.type=single-node
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- xpack.security.enabled=false # Set true when you using https
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- ./es-data:/usr/share/elasticsearch/data
ports:
- 9200:9200
kibana:
image: docker.elastic.co/kibana/kibana:7.17.6
container_name: kibana
ports:
- 5601:5601
environment:
ELASTICSEARCH_URL: http://es01:9200
ELASTICSEARCH_HOSTS: http://es01:9200
# kafka
zookeeper:
image: confluentinc/cp-zookeeper:latest
container_name: zookeeper
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
ports:
- "2181:2181"
kafka:
image: confluentinc/cp-kafka:latest
container_name: kafka
ports:
- "9092:9092"
depends_on:
- zookeeper
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: 'zookeeper:2181'
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_INTERNAL:PLAINTEXT
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:9092,PLAINTEXT_INTERNAL://localhost:19092
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
nest:
container_name: nest
restart: always
build:
dockerfile: Dockerfile
context: ./
env_file:
- .env
ports:
- ${PORT}:8000