Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
ogenes committed Feb 15, 2022
2 parents 03c8d19 + 0474c4a commit c2eedfc
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 6 deletions.
11 changes: 10 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,19 @@ MONGO_PORT=27017
MONGO_ROOT_USERNAME=root
MONGO_ROOT_PASSWORD=123456

### IPV4_ADDRESS #########################################
### ElasticSearch 7.17 ########################
ELASTICSEARCH_DATA_PATH=./data/elasticsearch/data
ELASTICSEARCH_PLUGINS_PATH=./data/elasticsearch/plugins

### Kibana 7.17 ########################
KIBANA_PORT=5602

### IPV4_ADDRESS ##############################
SUBNET=172.19.0.0/16
NGINX_IP=172.19.0.6
PHP_IP=172.19.0.5
MYSQL_IP=172.19.0.4
REDIS_IP=172.19.0.3
MONGO_IP=172.19.0.2
ELASTICSEARCH_IP=172.19.0.8
KIBANA_IP=172.19.0.9
53 changes: 48 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ x-hosts: &hosts
- default.dev.com:${NGINX_IP}

services:
### NGINX ################################################
### NGINX ##############################################################################
nginx:
build: ./nginx
container_name: nginx
Expand All @@ -29,7 +29,7 @@ services:
backend:
ipv4_address: ${NGINX_IP}

### MySQL ################################################
### MySQL ##############################################################################
mysql:
build:
context: ./mysql
Expand All @@ -53,7 +53,7 @@ services:
backend:
ipv4_address: ${MYSQL_IP}

### PHP ################################################
### PHP ################################################################################
php:
build:
context: ./php
Expand Down Expand Up @@ -81,7 +81,7 @@ services:
backend:
ipv4_address: ${PHP_IP}

### Redis ################################################
### Redis ##############################################################################
redis:
build:
context: ./redis
Expand All @@ -99,7 +99,7 @@ services:
backend:
ipv4_address: ${REDIS_IP}

### Mongo ################################################
### Mongo ##############################################################################
mongo:
build:
context: ./mongo
Expand All @@ -118,6 +118,49 @@ services:
backend:
ipv4_address: ${MONGO_IP}

### ElasticSearch ######################################################################
elasticsearch:
build:
context: ./elasticsearch
container_name: elasticsearch
environment:
- xpack.security.enabled=false
- discovery.type=single-node
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
cap_add:
- IPC_LOCK
volumes:
- ${ELASTICSEARCH_DATA_PATH}:/usr/share/elasticsearch/data
- ${ELASTICSEARCH_PLUGINS_PATH}:/usr/share/elasticsearch/plugins
ports:
- 9200:9200
- 9300:9300
networks:
backend:
ipv4_address: ${ELASTICSEARCH_IP}

### kibana ############################################################################
kibana7:
build:
context: ./kibana7
container_name: kibana7
environment:
- SERVER_NAME=kibana7
- XPACK_MONITORING_ENABLED=true
- ELASTICSEARCH_URL=http://elasticsearch:9200
ports:
- ${KIBANA_PORT}:5601
networks:
backend:
ipv4_address: ${KIBANA_IP}

networks:
backend:
driver: bridge
Expand Down
19 changes: 19 additions & 0 deletions elasticsearch/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM docker.elastic.co/elasticsearch/elasticsearch:7.17.0

LABEL maintainer="ogenes.yi@gmail.com"

# 复制时区配置
ENV TZ=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

# 安装基础
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
apt-utils \
curl \
sudo \
git \
vim \
wget \
net-tools \
&& rm -rf /var/lib/apt/lists/*
3 changes: 3 additions & 0 deletions kibana7/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM docker.elastic.co/kibana/kibana:7.17.0

LABEL maintainer="ogenes.yi@gmail.com"

0 comments on commit c2eedfc

Please sign in to comment.