-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
106 lines (100 loc) · 2.91 KB
/
docker-compose.yaml
File metadata and controls
106 lines (100 loc) · 2.91 KB
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
version: '3.3'
services:
# リバプロ
traefik:
image: traefik:latest
container_name: "traefik"
ports:
- "80:80"
- "18000:8080"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- ./src/traefik/traefik.yml:/etc/traefik/traefik.yml
nginx_a:
image: nginx
container_name: nginx_a
hostname: nginx_a
volumes:
- ${PWD}/src/nginx/service-a.html:/usr/share/nginx/html/service-a.html
labels:
- "traefik.enable=true"
- "traefik.http.routers.service-a.rule=PathPrefix(`/service-a`)"
- "traefik.http.routers.service-a.entrypoints=http"
depends_on:
- fluentd
logging:
driver: "fluentd"
options:
fluentd-address: localhost:24224
tag: nginx.a.access
# 起動時に接続を確立的無くても contaienr は起動する設定
fluentd-async-connect: "true"
nginx_b:
image: nginx
container_name: nginx_b
hostname: nginx_b
volumes:
- ${PWD}/src/nginx/service-b.html:/usr/share/nginx/html/service-b.html
labels:
- "traefik.enable=true"
- "traefik.http.routers.service-b.rule=PathPrefix(`/service-b`)"
- "traefik.http.routers.service-b.entrypoints=http"
depends_on:
- fluentd
logging:
driver: "fluentd"
options:
fluentd-address: localhost:24224
tag: nginx.b.access
# 起動時に接続を確立的無くても contaienr は起動する設定
fluentd-async-connect: "true"
fluentd:
build: ./src/fluentd
container_name: fluentd
hostname: fluentd
restart: always
ports:
- "24224:24224"
- "24220:24220"
- "24224:24224/udp"
# depends_on:
# - es
volumes:
#- ${PWD}/log:/fluentd/log
- ${PWD}/src/fluentd/fluent.conf:/fluentd/etc/fluent.conf:ro
# Elasticsearchコンテナ
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:8.4.3
container_name: elasticsearch
hostname: elasticsearch
restart: always
environment:
- discovery.type="single-node"
- cluster.name="es-cluster"
- node.name="elasticsearch"
- bootstrap.memory_lock=true
- xpack.security.enabled=false
- TZ=Asia/Tokyo
ulimits:
memlock:
soft: -1
hard: -1
# volumes:
# # データを永続化
# - ${PWD}/data:/usr/share/elasticsearch/data
ports:
- 9200:9200
# Kibanaのコンテナ
kibana:
image: docker.elastic.co/kibana/kibana:8.4.3
container_name: kibana
hostname: kibana
ports:
- 5601:5601
environment:
- ELASTICSEARCH_HOSTS=http://elasticsearch:9200
- TZ=Asia/Tokyo
- I18N_LOCALE=ja-JP
depends_on:
- elasticsearch
restart: always