Skip to content

Commit

Permalink
fix: docker-compose config volume error
Browse files Browse the repository at this point in the history
  • Loading branch information
ozline committed Dec 9, 2023
1 parent 88a87f9 commit 431f65c
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,4 @@ cmd/api/fzuhelper_api
# Hertz related
dumped_hertz_remote_config.json

/data
/docker/data
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ CONFIG_PATH = $(DIR)/config
IDL_PATH = $(DIR)/idl
OUTPUT_PATH = $(DIR)/output

SERVICES := template
SERVICES := template empty_room
service = $(word 1, $@)

# mock gen
Expand Down
46 changes: 23 additions & 23 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ networks:
services:

mysql:
container_name: mysql
container_name: fzuhelper-mysql
image: mysql:latest
restart: always
command: --default-authentication-plugin=mysql_native_password
Expand All @@ -18,15 +18,15 @@ services:
- MYSQL_PASSWORD=fzuhelper
- TZ=Asia/Shanghai
volumes:
- ./config/sql:/docker-entrypoint-initdb.d/
- ../config/sql:/docker-entrypoint-initdb.d/
- ./data/mysql:/var/lib/mysql
ports:
- "3306:3306"
networks:
- fzuhelper

redis:
container_name: redis
container_name: fzuhelper-redis
image: "redis:latest"
restart: always
ports:
Expand All @@ -40,7 +40,7 @@ services:
- fzuhelper

rabbitmq:
container_name: rabiitmq
container_name: fzuhelper-rabiitmq
image: "rabbitmq:latest"
ports:
- 5672:5672
Expand All @@ -54,7 +54,7 @@ services:
- fzuhelper

etcd:
container_name: etcd
container_name: fzuhelper-etcd
image: "quay.io/coreos/etcd:v3.5.5"
restart: always
ports:
Expand All @@ -66,15 +66,15 @@ services:
- ETCD_API=3
- ALLOW_NONE_AUTHENTICATION=yes
volumes:
- ./docker:/script
- ./config:/config
- ./:/script
- ../config:/config
- ./data/etcd:/etcd-data
networks:
- fzuhelper
entrypoint: ["sh", "-c", "chmod +x /script/etcd-monitor.sh && /script/etcd-monitor.sh & exec etcd"]

etcd-keeper:
hostname: etcdkeeper
hostname: fzuhelper-etcdkeeper
image: evildecay/etcdkeeper
environment:
- ETCD_HOSTS=http://etcd:2379
Expand All @@ -92,7 +92,7 @@ services:

elasticsearch:
image: elasticsearch:8.4.2
container_name: elasticsearch
container_name: fzuhelper-elasticsearch
environment:
bootstrap.memory_lock: "true"
ES_JAVA_OPTS: "-Xms512m -Xmx512m"
Expand All @@ -111,7 +111,7 @@ services:
soft: -1
hard: -1
volumes:
- ./config/elasticsearch:/usr/share/elasticsearch/config
- ../config/elasticsearch:/usr/share/elasticsearch/config
- ./data/elasticsearch:/usr/share/elasticsearch/data
ports:
- "9200:9200"
Expand All @@ -121,7 +121,7 @@ services:

kibana:
image: kibana:8.4.2
container_name: kibana
container_name: fzuhelper-kibana
environment:
- I18N_LOCALE=zh-CN
- XPACK_GRAPH_ENABLED=true
Expand All @@ -133,50 +133,50 @@ services:
ports:
- "5601:5601"
volumes:
- ./config/kibana:/usr/share/kibana/config
- ../config/kibana:/usr/share/kibana/config
- ./data/kibana:/usr/share/kibana/data
networks:
- fzuhelper

jaeger:
container_name: jaeger
container_name: fzuhelper-jaeger
image: "jaegertracing/all-in-one:latest"
restart: always
ports:
- 16686:16686
- 6831:6831/udp
volumes:
- ./data/jaeger:/var/lib/jaeger
- ./config/jaeger:/etc/jaeger
- ../config/jaeger:/etc/jaeger
networks:
- fzuhelper

prometheus:
image: prom/prometheus
container_name: prometheus
container_name: fzuhelper-prometheus
hostname: prometheus
restart: always
volumes:
- ./config/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
- ../config/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
ports:
- 9090:9090
networks:
- fzuhelper

grafana:
image: grafana/grafana
container_name: grafana
container_name: fzuhelper-grafana
restart: always
ports:
- 3000:3000
volumes:
- ./config/grafana:/etc/grafana
- ../config/grafana:/etc/grafana
networks:
- fzuhelper

alertmanager: #预警模块
image: prom/alertmanager
container_name: alertmanager
container_name: fzuhelper-alertmanager
restart: always
ports:
- 9093:9093
Expand All @@ -185,7 +185,7 @@ services:

node-exporter:
image: quay.io/prometheus/node-exporter
container_name: node-exporter
container_name: fzuhelper-node-exporter
restart: always
ports:
- 9100:9100
Expand All @@ -194,7 +194,7 @@ services:

cadvisor:
image: google/cadvisor:latest
container_name: cadvisor
container_name: fzuhelper-cadvisor
restart: always
platform: linux/amd64
volumes:
Expand All @@ -209,7 +209,7 @@ services:

redis-exporter:
image: oliver006/redis_exporter
container_name: redis-exporter
container_name: fzuhelper-redis-exporter
restart: always
ports:
- 9121:9121
Expand All @@ -220,7 +220,7 @@ services:

mysql_xporter:
image: prom/mysqld-exporter
container_name: mysql-exporter
container_name: fzuhelper-mysql-exporter
restart: always
ports:
- 9104:9104
Expand Down

0 comments on commit 431f65c

Please sign in to comment.