Skip to content

Commit

Permalink
server move
Browse files Browse the repository at this point in the history
  • Loading branch information
macrozheng committed Jan 4, 2019
1 parent 1a236d8 commit 7321481
Show file tree
Hide file tree
Showing 9 changed files with 92 additions and 110 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@
前端项目`mall-admin-web`地址:https://github.com/macrozheng/mall-admin-web

项目演示地址: [https://39.98.69.210/index.html](https://39.98.69.210/index.html)
项目演示地址: [https://39.98.190.128/index.html](https://39.98.190.128/index.html)

![后台管理系统功能演示.gif](https://github.com/macrozheng/mall/blob/master/document/resource/mall-admin.gif)

> 前台商城系统
前端项目`mall-app-web`地址:敬请期待......

项目演示地址:[https://39.98.69.210/mall-app/mainpage.html](https://39.98.69.210/mall-app/mainpage.html)
项目演示地址:[https://39.98.190.128/mall-app/mainpage.html](https://39.98.190.128/mall-app/mainpage.html)

![前台商城系统功能演示.gif](https://github.com/macrozheng/mall/blob/master/document/resource/mall-app.gif)

Expand Down
4 changes: 3 additions & 1 deletion document/reference/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ docker start $ContainerId
- docker rm -f $(docker ps -a -q)
### 查看启动错误日志
docker logs $ContainerIdName(或者$ContainerId)
### 查看容器的IP地址(172.17.0.*
docker inspect --format '{{ .NetworkSettings.IPAddress }}' $ContainerId

## Docker Registry
### Docker Registry 2.0搭建
Expand All @@ -52,7 +54,7 @@ docker tag macro/eureka-server:0.0.1 localhost:5000/macro/eureka-server:0.0.1
- tip:
pom.xml修改<imageName>192.168.1.71:5000/macro/${project.artifactId}:${project.version}</imageName>
- tip:
docker要支持http:echo '{ "insecure-registries":["192.168.1.71:5000"] }' > /etc/docker/daemon.json
docker要支持http:echo '{ "insecure-registries":["39.98.190.128:5000"] }' > /etc/docker/daemon.json
### 修改Docker镜像存放位置
1. 查看Docker的存放位置:docker info | grep "Docker Root Dir"(默认为/var/lib/docker)
2. 关闭Docker服务:systemctl stop docker
Expand Down
54 changes: 27 additions & 27 deletions mall-admin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -110,33 +110,33 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>1.1.0</version>
<executions>
<execution>
<id>build-image</id>
<phase>package</phase>
<goals>
<goal>build</goal>
</goals>
</execution>
</executions>
<configuration>
<imageName>mall/${project.artifactId}:${project.version}</imageName>
<dockerHost>https://192.168.1.71:2375</dockerHost>
<baseImage>java:8</baseImage>
<entryPoint>["java", "-jar", "-Dspring.profiles.active=prod","/${project.build.finalName}.jar"]</entryPoint>
<resources>
<resource>
<targetPath>/</targetPath>
<directory>${project.build.directory}</directory>
<include>${project.build.finalName}.jar</include>
</resource>
</resources>
</configuration>
</plugin>
<!--<plugin>-->
<!--<groupId>com.spotify</groupId>-->
<!--<artifactId>docker-maven-plugin</artifactId>-->
<!--<version>1.1.0</version>-->
<!--<executions>-->
<!--<execution>-->
<!--<id>build-image</id>-->
<!--<phase>package</phase>-->
<!--<goals>-->
<!--<goal>build</goal>-->
<!--</goals>-->
<!--</execution>-->
<!--</executions>-->
<!--<configuration>-->
<!--<imageName>mall/${project.artifactId}:${project.version}</imageName>-->
<!--<dockerHost>https://39.98.190.128:2375</dockerHost>-->
<!--<baseImage>java:8</baseImage>-->
<!--<entryPoint>["java", "-jar", "-Dspring.profiles.active=prod","/${project.build.finalName}.jar"]</entryPoint>-->
<!--<resources>-->
<!--<resource>-->
<!--<targetPath>/</targetPath>-->
<!--<directory>${project.build.directory}</directory>-->
<!--<include>${project.build.finalName}.jar</include>-->
<!--</resource>-->
<!--</resources>-->
<!--</configuration>-->
<!--</plugin>-->
</plugins>
</build>
</project>
4 changes: 2 additions & 2 deletions mall-admin/src/main/resources/application-prod.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#===datasource start===
spring.datasource.url=jdbc:mysql:https://db:3306/mall?useUnicode=true&characterEncoding=utf-8
spring.datasource.username=root
spring.datasource.password=root
spring.datasource.username=reader
spring.datasource.password=123456
#===datasource end===

#===druid start===
Expand Down
20 changes: 0 additions & 20 deletions mall-admin/src/main/resources/application-read.properties

This file was deleted.

54 changes: 27 additions & 27 deletions mall-portal/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -100,33 +100,33 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>1.1.0</version>
<executions>
<execution>
<id>build-image</id>
<phase>package</phase>
<goals>
<goal>build</goal>
</goals>
</execution>
</executions>
<configuration>
<imageName>mall/${project.artifactId}:${project.version}</imageName>
<dockerHost>https://192.168.1.71:2375</dockerHost>
<baseImage>java:8</baseImage>
<entryPoint>["java", "-jar","-Dspring.profiles.active=prod","/${project.build.finalName}.jar"]</entryPoint>
<resources>
<resource>
<targetPath>/</targetPath>
<directory>${project.build.directory}</directory>
<include>${project.build.finalName}.jar</include>
</resource>
</resources>
</configuration>
</plugin>
<!--<plugin>-->
<!--<groupId>com.spotify</groupId>-->
<!--<artifactId>docker-maven-plugin</artifactId>-->
<!--<version>1.1.0</version>-->
<!--<executions>-->
<!--<execution>-->
<!--<id>build-image</id>-->
<!--<phase>package</phase>-->
<!--<goals>-->
<!--<goal>build</goal>-->
<!--</goals>-->
<!--</execution>-->
<!--</executions>-->
<!--<configuration>-->
<!--<imageName>mall/${project.artifactId}:${project.version}</imageName>-->
<!--<dockerHost>https://39.98.190.128:2375</dockerHost>-->
<!--<baseImage>java:8</baseImage>-->
<!--<entryPoint>["java", "-jar","-Dspring.profiles.active=prod","/${project.build.finalName}.jar"]</entryPoint>-->
<!--<resources>-->
<!--<resource>-->
<!--<targetPath>/</targetPath>-->
<!--<directory>${project.build.directory}</directory>-->
<!--<include>${project.build.finalName}.jar</include>-->
<!--</resource>-->
<!--</resources>-->
<!--</configuration>-->
<!--</plugin>-->
</plugins>
</build>

Expand Down
4 changes: 2 additions & 2 deletions mall-portal/src/main/resources/application-prod.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ server.port=8085

#===datasource start===
spring.datasource.url=jdbc:mysql:https://db:3306/mall?useUnicode=true&characterEncoding=utf-8
spring.datasource.username=root
spring.datasource.password=root
spring.datasource.username=reader
spring.datasource.password=123456
#===datasource end===

#===druid start===
Expand Down
54 changes: 27 additions & 27 deletions mall-search/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -75,33 +75,33 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>1.1.0</version>
<executions>
<execution>
<id>build-image</id>
<phase>package</phase>
<goals>
<goal>build</goal>
</goals>
</execution>
</executions>
<configuration>
<imageName>mall/${project.artifactId}:${project.version}</imageName>
<dockerHost>https://192.168.1.71:2375</dockerHost>
<baseImage>java:8</baseImage>
<entryPoint>["java", "-jar", "-Dspring.profiles.active=prod","/${project.build.finalName}.jar"]</entryPoint>
<resources>
<resource>
<targetPath>/</targetPath>
<directory>${project.build.directory}</directory>
<include>${project.build.finalName}.jar</include>
</resource>
</resources>
</configuration>
</plugin>
<!--<plugin>-->
<!--<groupId>com.spotify</groupId>-->
<!--<artifactId>docker-maven-plugin</artifactId>-->
<!--<version>1.1.0</version>-->
<!--<executions>-->
<!--<execution>-->
<!--<id>build-image</id>-->
<!--<phase>package</phase>-->
<!--<goals>-->
<!--<goal>build</goal>-->
<!--</goals>-->
<!--</execution>-->
<!--</executions>-->
<!--<configuration>-->
<!--<imageName>mall/${project.artifactId}:${project.version}</imageName>-->
<!--<dockerHost>https://39.98.190.128:2375</dockerHost>-->
<!--<baseImage>java:8</baseImage>-->
<!--<entryPoint>["java", "-jar", "-Dspring.profiles.active=prod","/${project.build.finalName}.jar"]</entryPoint>-->
<!--<resources>-->
<!--<resource>-->
<!--<targetPath>/</targetPath>-->
<!--<directory>${project.build.directory}</directory>-->
<!--<include>${project.build.finalName}.jar</include>-->
<!--</resource>-->
<!--</resources>-->
<!--</configuration>-->
<!--</plugin>-->
</plugins>
</build>

Expand Down
4 changes: 2 additions & 2 deletions mall-search/src/main/resources/application-prod.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#===datasource start===
spring.datasource.url=jdbc:mysql:https://db:3306/mall?useUnicode=true&characterEncoding=utf-8
spring.datasource.username=root
spring.datasource.password=root
spring.datasource.username=reader
spring.datasource.password=123456
#===datasource end===

#===druid start===
Expand Down

0 comments on commit 7321481

Please sign in to comment.