更新 README.md
This commit is contained in:
parent
1b5e68eea9
commit
fec87cbc99
44
README.md
44
README.md
@ -1,39 +1,41 @@
|
|||||||
# Spring Boot Hello World
|
# Spring Boot Hello World
|
||||||
|
一个使用docker构建,docker-compose管理启动的Spring Boot测试应用程序
|
||||||
|
|
||||||
A spring boot enabled hello world application
|
|
||||||
|
|
||||||
[](https://travis-ci.org/gazgeek/springboot-helloworld)
|
## 使用命令
|
||||||
|
|
||||||
[](https://coveralls.io/r/gazgeek/springboot-helloworld)
|
- 创建服务并启动服务
|
||||||
|
|
||||||
- Travis CI build and test
|
|
||||||
- Continuous deployment to Heroku on success
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
- Directly using maven
|
|
||||||
```
|
```
|
||||||
mvn spring-boot:run
|
docker-compose up -d
|
||||||
```
|
```
|
||||||
|
|
||||||
- From within your IDE right click run
|
- 启动服务
|
||||||
```
|
```
|
||||||
Application.java
|
docker-compose start
|
||||||
```
|
```
|
||||||
|
|
||||||
- From executable jar file
|
- 停止服务
|
||||||
```
|
```
|
||||||
mvn clean install
|
docker-compose stop
|
||||||
java -jar target/helloworld-0.0.1-SNAPSHOT.jar
|
|
||||||
```
|
```
|
||||||
|
|
||||||
- To run this as a docker application (assumption docker is installed on your machine)
|
- 重启服务
|
||||||
```
|
```
|
||||||
docker pull gazgeek/springboot-helloworld
|
docker-compose restart
|
||||||
docker container run -p 8080:8080 -d gazgeek/springboot-helloworld
|
|
||||||
|
|
||||||
Go to Browser and type http://localhost:8080/ or do curl http://localhost:8080/ on command prompt
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
- 销毁服务
|
||||||
|
```
|
||||||
|
docker-compose down
|
||||||
|
```
|
||||||
|
|
||||||
|
- 销毁服务及镜像,下次重新编译打包
|
||||||
|
```
|
||||||
|
docker-compose down --rmi local
|
||||||
|
```
|
||||||
|
|
||||||
|
- 只构建镜像
|
||||||
|
```
|
||||||
|
docker build -t springboot-helloworld:v0.0.1 .
|
||||||
|
```
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user