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
73214817
Commit
73214817
authored
Jan 04, 2019
by
zhh
Browse files
server move
parent
1a236d8e
Changes
9
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
73214817
...
...
@@ -28,7 +28,7 @@
前端项目
`mall-admin-web`
地址:https://github.com/macrozheng/mall-admin-web
项目演示地址:
[
http://39.98.
69.210
/index.html
](
http://39.98.
69.210
/index.html
)
项目演示地址:
[
http://39.98.
190.128
/index.html
](
http://39.98.
190.128
/index.html
)

...
...
@@ -36,7 +36,7 @@
前端项目
`mall-app-web`
地址:敬请期待......
项目演示地址:
[
http://39.98.
69.210
/mall-app/mainpage.html
](
http://39.98.
69.210
/mall-app/mainpage.html
)
项目演示地址:
[
http://39.98.
190.128
/mall-app/mainpage.html
](
http://39.98.
190.128
/mall-app/mainpage.html
)

...
...
document/reference/docker.md
View file @
73214817
...
...
@@ -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搭建
...
...
@@ -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
...
...
mall-admin/pom.xml
View file @
73214817
...
...
@@ -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>
http://
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>http://
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>
mall-admin/src/main/resources/application-prod.properties
View file @
73214817
#===datasource start===
spring.datasource.url
=
jdbc:mysql://db:3306/mall?useUnicode=true&characterEncoding=utf-8
spring.datasource.username
=
r
oot
spring.datasource.password
=
root
spring.datasource.username
=
r
eader
spring.datasource.password
=
123456
#===datasource end===
#===druid start===
...
...
mall-admin/src/main/resources/application-read.properties
deleted
100644 → 0
View file @
1a236d8e
#===datasource start===
#===just for read===
spring.datasource.url
=
jdbc:mysql://localhost/mall?useUnicode=true&characterEncoding=utf-8
spring.datasource.username
=
reader
spring.datasource.password
=
123456
#===datasource end===
#===druid start===
#\u8FDE\u63A5\u6C60\u521D\u59CB\u5316\u5927\u5C0F
spring.datasource.druid.initial-size
=
5
#\u6700\u5C0F\u7A7A\u95F2\u8FDE\u63A5\u6570
spring.datasource.druid.min-idle
=
10
#\u6700\u5927\u8FDE\u63A5\u6570
spring.datasource.druid.max-active
=
20
#\u4E0D\u7EDF\u8BA1\u8FD9\u4E9B\u8BF7\u6C42\u6570\u636E
spring.datasource.druid.web-stat-filter.exclusions
=
*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*
#\u8BBF\u95EE\u76D1\u63A7\u7F51\u9875\u7684\u767B\u5F55\u7528\u6237\u540D\u548C\u5BC6\u7801
spring.datasource.druid.stat-view-servlet.login-username
=
druid
spring.datasource.druid.stat-view-servlet.login-password
=
druid
#===druid
end
=
==
\ No newline at end of file
mall-portal/pom.xml
View file @
73214817
...
...
@@ -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>
http://
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>http://
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>
...
...
mall-portal/src/main/resources/application-prod.properties
View file @
73214817
...
...
@@ -4,8 +4,8 @@ server.port=8085
#===datasource start===
spring.datasource.url
=
jdbc:mysql://db:3306/mall?useUnicode=true&characterEncoding=utf-8
spring.datasource.username
=
r
oot
spring.datasource.password
=
root
spring.datasource.username
=
r
eader
spring.datasource.password
=
123456
#===datasource end===
#===druid start===
...
...
mall-search/pom.xml
View file @
73214817
...
...
@@ -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>
http://
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>http://
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>
...
...
mall-search/src/main/resources/application-prod.properties
View file @
73214817
#===datasource start===
spring.datasource.url
=
jdbc:mysql://db:3306/mall?useUnicode=true&characterEncoding=utf-8
spring.datasource.username
=
r
oot
spring.datasource.password
=
root
spring.datasource.username
=
r
eader
spring.datasource.password
=
123456
#===datasource end===
#===druid start===
...
...
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