litemall-wx-api 加入了使用docker部署的方式
This commit is contained in:
@@ -10,6 +10,13 @@
|
||||
<version>0.1.0</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<java.version>1.8</java.version>
|
||||
<docker.image.prefix>litemall</docker.image.prefix>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
@@ -35,6 +42,22 @@
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
</resource>
|
||||
|
||||
<resource>
|
||||
<directory>src/main/java</directory>
|
||||
<includes>
|
||||
<include>**/*.properties</include>
|
||||
<include>**/*.xml</include>
|
||||
</includes>
|
||||
<filtering>false</filtering>
|
||||
</resource>
|
||||
</resources>
|
||||
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
@@ -53,6 +76,24 @@
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>com.spotify</groupId>
|
||||
<artifactId>docker-maven-plugin</artifactId>
|
||||
<version>0.4.13</version>
|
||||
<configuration>
|
||||
<imageName>${docker.image.prefix}/${project.artifactId}</imageName>
|
||||
<dockerDirectory>src/main/docker</dockerDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<targetPath>/</targetPath>
|
||||
<directory>${project.build.directory}</directory>
|
||||
<include>${project.build.finalName}.jar</include>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
||||
4
litemall-wx-api/src/main/docker/Dockerfile
Normal file
4
litemall-wx-api/src/main/docker/Dockerfile
Normal file
@@ -0,0 +1,4 @@
|
||||
FROM java
|
||||
MAINTAINER tiger <tiger@microsoul.com>
|
||||
ADD /litemall-wx-api-0.1.0.jar //
|
||||
ENTRYPOINT java -jar /litemall-wx-api-0.1.0.jar
|
||||
14
litemall-wx-api/src/main/resources/application-docker.yml
Normal file
14
litemall-wx-api/src/main/resources/application-docker.yml
Normal file
@@ -0,0 +1,14 @@
|
||||
spring:
|
||||
datasource:
|
||||
driver-class-name: com.mysql.jdbc.Driver
|
||||
url: jdbc:mysql://${MYSQL_HOST}:3306/${MYSQL_DATABASE}?useUnicode=true&characterEncoding=utf-8
|
||||
username: ${MYSQL_USERNAME}
|
||||
password: ${MYSQL_PASSWORD}
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
|
||||
wx:
|
||||
app-id: ${WX_APP_ID}
|
||||
app-secret: ${WX_APP_SECRET}
|
||||
mch-id: ${WX_MCH_ID}
|
||||
mch-key: ${WX_MCH_KEY}
|
||||
notify-url: ${WX_NOTIFY_URL}
|
||||
@@ -1,3 +1,3 @@
|
||||
spring.profiles.active=dev
|
||||
spring.profiles.active=docker
|
||||
server.port=8082
|
||||
logging.level.org.linlinjava.litemall.wx.Application=DEBUG
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
},
|
||||
"compileType": "miniprogram",
|
||||
"libVersion": "1.9.93",
|
||||
"appid": "wxa5b486c6b918ecfb",
|
||||
"projectname": "litemall-wx",
|
||||
"appid": "wx3d9beeb7481eddd3",
|
||||
"projectname": "%E5%BE%AE%E5%A6%9E%E6%89%AB%E7%A0%81%E8%B4%AD",
|
||||
"condition": {
|
||||
"search": {
|
||||
"current": -1,
|
||||
|
||||
Reference in New Issue
Block a user