Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
wwwanlingxiao
mall
Commits
f9292708
"jetbrains:/idea/checkout/git" did not exist on "3d53a3a0ec6d485171930f4f5cafbaee47b395b2"
Commit
f9292708
authored
Aug 21, 2018
by
zhh
Browse files
添加自动化部署脚本
parent
8cb20508
Changes
3
Hide whitespace changes
Inline
Side-by-side
document/docker/docker-compose.yml
0 → 100644
View file @
f9292708
version
:
'
2'
services
:
mysql
:
image
:
mysql:5.7
ports
:
-
3306:3306
volumes
:
-
/mydata/mysql/data:/var/lib/mysql
-
/mydata/mysql/conf:/etc/mysql
-
/mydata/mysql/log:/var/log/mysql
environment
:
-
MYSQL_ROOT_PASSWORD:root
elasticsearch
:
image
:
elasticsearch:2.4
ports
:
-
9200:9200
-
9300:9300
volumes
:
-
/mydata/elasticsearch/plugins:/usr/share/elasticsearch/plugins
-
/mydata/elasticsearch/data:/usr/share/elasticsearch/data
redis
:
image
:
redis:3.2
ports
:
-
6379:6379
volumes
:
-
/mydata/redis/data:/data
command
:
redis-server --appendonly yes
mongo
:
image
:
mongo:3.2
ports
:
-
27017:27017
volumes
:
-
/mydata/mongo/db:/data/db
nginx
:
image
:
nginx:1.10
ports
:
-
80:80
volumes
:
-
/mydata/nginx/html:/usr/share/nginx/html
-
/mydata/nginx/logs:/var/log/nginx
-
/mydata/nginx/conf:/etc/nginx
mall-admin
:
image
:
mall/mall-admin:0.0.1-SNAPSHOT
ports
:
-
8080:8080
links
:
-
mysql:db
mall-search
:
image
:
mall/mall-search:0.0.1-SNAPSHOT
ports
:
-
8081:8081
links
:
-
elasticsearch:es
-
mysql:db
mall-portal
:
image
:
mall/mall-portal:0.0.1-SNAPSHOT
ports
:
-
8085:8085
links
:
-
redis:redis
-
mongo:mongo
-
mysql:db
\ No newline at end of file
document/docker/docker-deploy.md
View file @
f9292708
...
...
@@ -27,7 +27,7 @@ docker pull mysql:5.7
###创建实例并启动
docker run -p 3306:3306 --name mysql
\
-v /mydata/mysql/log:/var/log/mysql
\
-v /mydata/mysql/data:/var/lib/mysql
/
\
-v /mydata/mysql/data:/var/lib/mysql
\
-v /mydata/mysql/conf:/etc/mysql
\
-e MYSQL_ROOT_PASSWORD=123456
\
-d mysql:5.7
...
...
@@ -85,7 +85,10 @@ rabbitmq:management
###下载镜像文件
docker pull elasticsearch:2.4
###创建实例并运行
docker run -p 9200:9200 -p 9300:9300 --name elasticsearch -d elasticsearch:2.4
docker run -p 9200:9200 -p 9300:9300 --name elasticsearch
\
-v /mydata/elasticsearch/plugins:/usr/share/elasticsearch/plugins
\
-v /mydata/elasticsearch/data:/usr/share/elasticsearch/data
\
-d elasticsearch:2.4
###测试
访问会返回版本信息:http://192.168.1.66:9200/
###安装目录位置
...
...
@@ -111,7 +114,7 @@ docker run -p 27017:27017 --name mongo -v $PWD/db:/data/db -d mongo:3.2
###使用mongo命令进入容器
docker exec -it mongo mongo
##SpringBoot应用部署
##SpringBoot应用
命令
部署
**docker容器间进行连接才能互相访问**
###部署mall-admin
docker run -p 8080:8080 --name mall-admin
\
...
...
@@ -127,4 +130,10 @@ docker run -p 8085:8085 --name mall-portal \
--link mysql:db
\
--link redis:redis
\
--link mongo:mongo
\
-d mall/mall-portal:0.0.1-SNAPSHOT
\ No newline at end of file
-d mall/mall-portal:0.0.1-SNAPSHOT
##SpringBoot应用自动化部署
###部署文件
document/docker/docker-compose.yml
###部署命令
docker-compose up -d
\ No newline at end of file
document/docker/host.txt
View file @
f9292708
192.168.1.71 db
192.168.1.71 es
192.168.1.71 redis
192.168.1.71 mongo
\ No newline at end of file
192.168.1.78 db
192.168.1.78 es
192.168.1.78 redis
192.168.1.78 mongo
192.168.1.78 mall-admin
192.168.1.78 mall-search
192.168.1.78 mall-portal
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment