Skip to content

Commit 41fcedc

Browse files
authored
Merge pull request #166 from kt-cloud-basic-project/SHOP-134
feat: ์ธํ”„๋ผ ํ™˜๊ฒฝ ์„ค์ •
2 parents 971d0d1 + d81223e commit 41fcedc

15 files changed

Lines changed: 188 additions & 2 deletions

File tree

โ€Ž.DS_Storeโ€Ž

0 Bytes
Binary file not shown.
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
services:
2+
local-mysql:
3+
image: mysql
4+
container_name: techup-mysql
5+
environment:
6+
MYSQL_ROOT_PASSWORD: 1234
7+
MYSQL_DATABASE: shopping
8+
ports:
9+
- "3306:3306"
10+
platform: linux/arm64
11+
12+
local-redis:
13+
image: redis
14+
container_name: techup-redis
15+
ports:
16+
- "6379:6379"
17+
platform: linux/arm64
18+
command: ["redis-server", "--ignore-warnings", "ARM64-COW-BUG"]
19+
20+
local-prometheus:
21+
image: prom/prometheus:latest
22+
container_name: my-prometheus-container
23+
ports:
24+
- "9091:9090"
25+
volumes:
26+
- ./prometheus.yml:/etc/prometheus/prometheus.yml
27+
local-grafana:
28+
image: grafana/grafana:latest
29+
container_name: my-grafana-container
30+
ports:
31+
- "3001:3000"
32+
depends_on:
33+
- local-prometheus
34+
35+
elasticsearch:
36+
image: docker.elastic.co/elasticsearch/elasticsearch:9.2.2
37+
container_name: elasticsearch
38+
environment:
39+
- discovery.type=single-node
40+
- ES_JAVA_OPTS=-Xms1g -Xmx1g -XX:UseSVE=0
41+
- xpack.security.enabled=false
42+
- JAVA_TOOL_OPTIONS=-XX:UseSVE=0
43+
- CLI_JAVA_OPTS=-XX:UseSVE=0
44+
ports:
45+
- "9200:9200"
46+
volumes:
47+
- es-data:/usr/share/elasticsearch/data
48+
- ./elk/elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml:ro
49+
networks:
50+
- elk
51+
52+
logstash:
53+
image: docker.elastic.co/logstash/logstash:9.2.2
54+
container_name: logstash
55+
environment:
56+
- LS_JAVA_OPTS=-Xms512m -Xmx512m -Djava.io.tmpdir=/usr/share/logstash/tmp
57+
- ENVIRONMENT=local
58+
volumes:
59+
- ./elk/logstash/tmp:/usr/share/logstash/tmp
60+
- ./elk/logstash/config/logstash.yml:/usr/share/logstash/config/logstash.yml:ro
61+
- ./elk/logstash/pipeline:/usr/share/logstash/pipeline:ro
62+
ports:
63+
- "9601:9601"
64+
depends_on:
65+
- elasticsearch
66+
networks:
67+
- elk
68+
69+
kibana:
70+
image: docker.elastic.co/kibana/kibana:9.2.2
71+
container_name: kibana
72+
depends_on:
73+
- elasticsearch
74+
environment:
75+
- ELASTICSEARCH_HOSTS=http://elasticsearch:9200
76+
ports:
77+
- "5601:5601"
78+
volumes:
79+
- ./elk/kibana/config/kibana.yml:/usr/share/kibana/config/kibana.yml:ro
80+
networks:
81+
- elk
82+
83+
networks:
84+
elk:
85+
driver: bridge
86+
87+
volumes:
88+
es-data:
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
cluster.name: "docker-cluster"
2+
network.host: 0.0.0.0
3+
discovery.type: single-node
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
cluster.name: "docker-cluster"
2+
network.host: 0.0.0.0
3+
discovery.type: single-node
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
server.name: kibana
2+
server.host: "0.0.0.0"
3+
elasticsearch.hosts: [ "http://elasticsearch:9200" ]
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#http.host: "0.0.0.0"
2+
xpack.monitoring.enabled: false
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
input {
2+
tcp {
3+
port => 9601 # docker-compose ์—์„œ ์—ด์–ด๋‘” ํฌํŠธ
4+
mode => "server"
5+
codec => json_lines # LogstashEncoder ๊ธฐ๋ณธ ํฌ๋งท๊ณผ ์ž˜ ๋งž์Œ
6+
}
7+
}
8+
9+
filter {
10+
mutate {
11+
add_field => { "app" => "techup-shopping" }
12+
add_field => { "env" => "${ENVIRONMENT}" }
13+
}
14+
}
15+
16+
output {
17+
elasticsearch {
18+
hosts => ["http://elasticsearch:9200"]
19+
index => "ep-logs-%{+YYYY.MM.dd}"
20+
}
21+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
server.name: kibana
2+
server.host: "0.0.0.0"
3+
elasticsearch.hosts: [ "http://elasticsearch:9200" ]
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#http.host: "0.0.0.0"
2+
xpack.monitoring.enabled: false
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
input {
2+
tcp {
3+
port => 9601 # docker-compose ์—์„œ ์—ด์–ด๋‘” ํฌํŠธ
4+
mode => "server"
5+
codec => json_lines # LogstashEncoder ๊ธฐ๋ณธ ํฌ๋งท๊ณผ ์ž˜ ๋งž์Œ
6+
}
7+
}
8+
9+
filter {
10+
mutate {
11+
add_field => { "app" => "techup-shopping" }
12+
add_field => { "env" => "${ENVIRONMENT}" }
13+
}
14+
}
15+
16+
output {
17+
elasticsearch {
18+
hosts => ["http://elasticsearch:9200"]
19+
index => "ep-logs-%{+YYYY.MM.dd}"
20+
}
21+
}

0 commit comments

Comments
ย (0)