This repository has been archived by the owner on Apr 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
489 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,14 @@ | ||
.env | ||
*.tar | ||
*.tgz | ||
*.tar.* | ||
*.tgz.* | ||
*.zip | ||
.DS_Store | ||
*.DS_Store | ||
*.log | ||
/conf.ini | ||
/examples | ||
/tmp | ||
/runtime | ||
/.idea | ||
data/logs/* | ||
data/mysql/* | ||
*.swp | ||
*.pid | ||
|
||
conf/apache/vhosts/* | ||
!conf/apache/vhosts/default.conf | ||
!conf/apache/vhosts/envdev_home.conf | ||
conf/nginx/vhosts/* | ||
!conf/nginx/vhosts/default.conf | ||
!conf/nginx/vhosts/envdev_home.conf | ||
conf/ssl/* | ||
!conf/ssl/envdev.crt | ||
!conf/ssl/envdev.key | ||
!conf/ssl/envdev.csr | ||
projects/* | ||
!projects/index.php | ||
!projects/phpinfo.php | ||
.env | ||
profiles/* | ||
|
||
# IntelliJ project files | ||
.idea | ||
composer | ||
logs/ | ||
mysql/ | ||
www/ | ||
!/config/nginx/conf.d/laravel.conf | ||
/config/nginx/conf.d/* | ||
/config/nginx/.DS_Store | ||
/.DS_Store | ||
.env | ||
docker-compose.yml | ||
www/* | ||
!www/default | ||
nginx/conf.d/* | ||
!nginx/conf.d/default.conf | ||
mysql/data | ||
redis/data | ||
mongodb/data | ||
log | ||
|
||
.idea | ||
.DS_Store | ||
nohup.out | ||
docker-compose.yml | ||
docker-compose.yml.* | ||
www/* | ||
!www/localhost/ | ||
logs/* | ||
/tmp | ||
/examples | ||
/runtime |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/sh | ||
|
||
CURRENTPATH=$(dirname "${0}"); | ||
export $(grep -v '^#' $CURRENTPATH/../.env | xargs) | ||
export USER_ID=$(id -u) | ||
export GROUP_ID=$(id -g) | ||
|
||
docker run \ --rm \ | ||
-i \ | ||
--network=host \ | ||
-v "$PWD":"$PWD":ro \ | ||
-v $(realpath ~/.ssh):"/root/.ssh" \ | ||
-v $(realpath ~/.ssh):"/home/vfac/.ssh" \ | ||
-w $PWD \ | ||
-u $USER_ID:$GROUP_ID \ | ||
vfac/envdevjs:${BASE_VERSION} \ | ||
composer "$@" | ||
|
||
exit $? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,208 @@ | ||
version: "3.2" | ||
services: | ||
es-master: | ||
container_name: es-master | ||
hostname: es-master | ||
image: elasticsearch:7.4.2 | ||
restart: always | ||
ports: | ||
- 9200:9200 | ||
- 9300:9300 | ||
volumes: | ||
- ./elasticsearch/master/conf/es-master.yml:/usr/share/elasticsearch/config/elasticsearch.yml | ||
- ./elasticsearch/master/data:/usr/share/elasticsearch/data | ||
- ./elasticsearch/master/logs:/usr/share/elasticsearch/logs | ||
- ./escerts:/usr/share/elasticsearch/config/certs | ||
environment: | ||
- "ES_JAVA_OPTS=-Xms512m -Xmx512m" | ||
- TIMEZONE=Asia/ShangHai | ||
- ELASTIC_PASSWORD=123456 | ||
#ulimits: | ||
# memlock: | ||
# soft: -1 | ||
# hard: -1 | ||
# nofile: | ||
# soft: 65536 | ||
# hard: 65536 | ||
networks: | ||
- elknet | ||
|
||
es-slave1: | ||
container_name: es-slave1 | ||
image: elasticsearch:7.4.2 | ||
restart: always | ||
ports: | ||
- 9201:9200 | ||
- 9301:9300 | ||
volumes: | ||
- ./elasticsearch/slave1/conf/es-slave1.yml:/usr/share/elasticsearch/config/elasticsearch.yml | ||
- ./elasticsearch/slave1/data:/usr/share/elasticsearch/data | ||
- ./elasticsearch/slave1/logs:/usr/share/elasticsearch/logs | ||
- ./escerts:/usr/share/elasticsearch/config/certs | ||
environment: | ||
- "ES_JAVA_OPTS=-Xms512m -Xmx512m" | ||
- TIMEZONE=Asia/ShangHai | ||
#ulimits: | ||
# memlock: | ||
# soft: -1 | ||
# hard: -1 | ||
# nofile: | ||
# soft: 65536 | ||
# hard: 65536 | ||
networks: | ||
- elknet | ||
|
||
es-slave2: | ||
container_name: es-slave2 | ||
image: elasticsearch:7.4.2 | ||
restart: always | ||
ports: | ||
- 9202:9200 | ||
- 9302:9300 | ||
volumes: | ||
- ./elasticsearch/slave2/conf/es-slave2.yml:/usr/share/elasticsearch/config/elasticsearch.yml | ||
- ./elasticsearch/slave2/data:/usr/share/elasticsearch/data | ||
- ./elasticsearch/slave2/logs:/usr/share/elasticsearch/logs | ||
- ./escerts:/usr/share/elasticsearch/config/certs | ||
environment: | ||
- "ES_JAVA_OPTS=-Xms512m -Xmx512m" | ||
- TIMEZONE=Asia/ShangHai | ||
#ulimits: | ||
# memlock: | ||
# soft: -1 | ||
# hard: -1 | ||
# nofile: | ||
# soft: 65536 | ||
# hard: 65536 | ||
networks: | ||
- elknet | ||
|
||
# kibana | ||
kibana: | ||
container_name: kibana | ||
hostname: kibana | ||
image: kibana:7.4.2 | ||
restart: always | ||
ports: | ||
- 5601:5601 | ||
volumes: | ||
- ./kibana/conf/kibana.yml:/usr/share/kibana/config/kibana.yml | ||
environment: | ||
- elasticsearch.hosts=http://es-master:9200 | ||
- TIMEZONE=Asia/ShangHai | ||
depends_on: | ||
- es-master | ||
- es-slave1 | ||
- es-slave2 | ||
networks: | ||
- elknet | ||
|
||
# logstash | ||
logstash: | ||
container_name: logstash | ||
hostname: logstash | ||
image: logstash:7.4.2 | ||
command: logstash -f ./conf/logstash-filebeat.conf | ||
restart: always | ||
volumes: | ||
# 映射到容器中 | ||
- ./logstash/conf/logstash-filebeat.conf:/usr/share/logstash/conf/logstash-filebeat.conf | ||
- ./logstash/conf/logstash.yml:/usr/share/logstash/config/logstash.yml | ||
environment: | ||
- elasticsearch.hosts=http://es-master:9200 | ||
# 解决logstash监控连接报错 | ||
- xpack.monitoring.elasticsearch.hosts=http://es-master:9200 | ||
- TIMEZONE=Asia/ShangHai | ||
ports: | ||
- 5044:5044 | ||
depends_on: | ||
- es-master | ||
- es-slave1 | ||
- es-slave2 | ||
networks: | ||
- elknet | ||
|
||
# filebeat | ||
filebeat: | ||
container_name: filebeat | ||
hostname: filebeat | ||
image: docker.elastic.co/beats/filebeat:7.4.2 | ||
restart: always | ||
volumes: | ||
- ./filebeat/conf/filebeat.yml:/usr/share/filebeat/filebeat.yml | ||
- ./logs:/var/log | ||
- /www/docker/log:/var/laravellog | ||
- ./filebeat/logs:/usr/share/filebeat/logs | ||
- ./filebeat/data:/usr/share/filebeat/data | ||
# 将指定容器连接到当前连接,可以设置别名,避免ip方式导致的容器重启动态改变的无法连接情况 | ||
environment: | ||
- TIMEZONE=Asia/ShangHai | ||
links: | ||
- logstash | ||
# 依赖服务[可无] | ||
depends_on: | ||
- es-master | ||
- es-slave1 | ||
- es-slave2 | ||
networks: | ||
- elknet | ||
|
||
# es-head | ||
es-head: | ||
container_name: es-head | ||
image: mobz/elasticsearch-head:5 | ||
restart: always | ||
ports: | ||
- 9100:9100 | ||
depends_on: | ||
- es-master | ||
- es-slave1 | ||
- es-slave2 | ||
networks: | ||
- elknet | ||
|
||
# es监控工具 | ||
cerebro: | ||
container_name: cerebro | ||
image: lmenezes/cerebro | ||
restart: always | ||
ports: | ||
- 9001:9000 | ||
command: | ||
- -Dhosts.0.host=http://es-master:9200 | ||
networks: | ||
- elknet | ||
|
||
# es索引管理 | ||
#curator: | ||
# container_name: curator | ||
# image: elastic/curator | ||
# environment: | ||
# ELASTICSEARCH_HOST: http://es-master:9200 | ||
# CRON: "30 0 * * *" # 每天 0 点 30 分清理 ${UNIT_COUNT} 天之前的索引 | ||
# CONFIG_FILE: /usr/share/curator/config/curator.yml | ||
# COMMAND: /usr/share/curator/config/delete_log_files_curator.yml | ||
# UNIT_COUNT: 10 | ||
# network_mode: "host" | ||
# restart: always | ||
# depends_on: | ||
# - es-master | ||
# - es-slave1 | ||
# - es-slave2 | ||
|
||
# docker可视化工具 | ||
#portainer: | ||
# container_name: portainer | ||
# image: portainer/portainer | ||
# ports: | ||
# - 9002:9002 | ||
# command: -H unix:///var/run/docker.sock | ||
# volumes: | ||
# - /var/run/docker.sock:/var/run/docker.sock | ||
# - ./portainer-data:/data | ||
# networks: | ||
# - elknet | ||
|
||
networks: | ||
elknet: | ||
driver: bridge |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# | ||
# Copy createdb.sql.example to createdb.sql | ||
# then uncomment then set database name and username to create you need databases | ||
# | ||
# example: .env MYSQL_USER=appuser and needed db name is myshop_db | ||
# | ||
# CREATE DATABASE IF NOT EXISTS `myshop_db` ; | ||
# GRANT ALL ON `myshop_db`.* TO 'appuser'@'%' ; | ||
# | ||
# | ||
# this sql script will auto run when the mysql container starts and the $DATA_PATH_HOST/mysql not found. | ||
# | ||
# if your $DATA_PATH_HOST/mysql exists and you do not want to delete it, you can run by manual execution: | ||
# | ||
# docker-compose exec mysql bash | ||
# mysql -u root -p < /docker-entrypoint-initdb.d/createdb.sql | ||
# | ||
|
||
#CREATE DATABASE IF NOT EXISTS `dev_db_1` COLLATE 'utf8_general_ci' ; | ||
#GRANT ALL ON `dev_db_1`.* TO 'default'@'%' ; | ||
|
||
#CREATE DATABASE IF NOT EXISTS `dev_db_2` COLLATE 'utf8_general_ci' ; | ||
#GRANT ALL ON `dev_db_2`.* TO 'default'@'%' ; | ||
|
||
#CREATE DATABASE IF NOT EXISTS `dev_db_3` COLLATE 'utf8_general_ci' ; | ||
#GRANT ALL ON `dev_db_3`.* TO 'default'@'%' ; | ||
|
||
FLUSH PRIVILEGES ; |
Oops, something went wrong.