feat:增加Docker部署
This commit is contained in:
6
Dockerfile
Normal file
6
Dockerfile
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
FROM openjdk:17-jdk
|
||||||
|
ARG JAR_FILE=target/*.jar
|
||||||
|
COPY $JAR_FILE app.jar
|
||||||
|
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
|
||||||
|
RUN echo 'Asia/Shanghai' > /etc/timezone
|
||||||
|
ENTRYPOINT ["java","-jar","/app.jar"]
|
||||||
@@ -1,9 +1,14 @@
|
|||||||
spring:
|
spring:
|
||||||
datasource:
|
datasource:
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
url: jdbc:mysql://mysql:3306/food_hub?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=UTF-8&useSSL=false
|
url: jdbc:mysql://host.docker.internal:3306/food_hub?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=UTF-8&useSSL=false
|
||||||
username: docker
|
username: root
|
||||||
password: 19940822Cxx
|
password: 19940822Cxx@1213
|
||||||
|
|
||||||
file:
|
file:
|
||||||
path: /upload-file/
|
path: /upload-file/
|
||||||
|
|
||||||
|
logging:
|
||||||
|
fluentd:
|
||||||
|
host: host.docker.internal
|
||||||
|
port: 24224
|
||||||
@@ -1,12 +1,12 @@
|
|||||||
server:
|
server:
|
||||||
port: 8100
|
port: 8083
|
||||||
|
|
||||||
spring:
|
spring:
|
||||||
application:
|
application:
|
||||||
name: @project.artifactId@
|
name: @project.artifactId@
|
||||||
version: @project.version@
|
version: @project.version@
|
||||||
profiles:
|
profiles:
|
||||||
active: dev
|
active: docker
|
||||||
|
|
||||||
# mybatis plus mapper路径
|
# mybatis plus mapper路径
|
||||||
mybatis-plus:
|
mybatis-plus:
|
||||||
|
|||||||
Reference in New Issue
Block a user