Add Dockerfile, Drone CI config, fix main class
This commit is contained in:
28
.drone.yml
Normal file
28
.drone.yml
Normal file
@@ -0,0 +1,28 @@
|
||||
kind: pipeline
|
||||
type: exec
|
||||
name: build-and-deploy
|
||||
|
||||
platform:
|
||||
os: linux
|
||||
arch: amd64
|
||||
|
||||
steps:
|
||||
- name: build-backend
|
||||
commands:
|
||||
- source /root/.sdkman/bin/sdkman-init.sh
|
||||
- sdk use java 8.0.432-amzn
|
||||
- cd jshERP-boot
|
||||
- mvn package -DskipTests
|
||||
|
||||
- name: build-frontend
|
||||
commands:
|
||||
- cd jshERP-web
|
||||
- npm install --legacy-peer-deps
|
||||
- npx vue-cli-service build
|
||||
|
||||
- name: docker-build-deploy
|
||||
commands:
|
||||
- docker build -t jsherp:latest .
|
||||
- docker stop jsherp || true
|
||||
- docker rm jsherp || true
|
||||
- docker run -d --name jsherp --network host -v /opt/jshERP/upload:/opt/jshERP/upload --restart unless-stopped jsherp:latest
|
||||
7
Dockerfile
Normal file
7
Dockerfile
Normal file
@@ -0,0 +1,7 @@
|
||||
FROM amazoncorretto:8-alpine
|
||||
WORKDIR /app
|
||||
COPY jshERP-boot/target/jshERP.jar /app/jshERP.jar
|
||||
COPY jshERP-web/dist /app/static
|
||||
RUN mkdir -p /opt/jshERP/upload /opt/tmp/tomcat
|
||||
EXPOSE 9999
|
||||
ENTRYPOINT ["java", "-jar", "/app/jshERP.jar"]
|
||||
@@ -141,6 +141,9 @@
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<mainClass>com.jsh.erp.ErpApplication</mainClass>
|
||||
</configuration>
|
||||
<version>2.0.3.RELEASE</version>
|
||||
<executions>
|
||||
<execution>
|
||||
|
||||
@@ -7,13 +7,13 @@ server.servlet.context-path=/jshERP-boot
|
||||
spring.datasource.url=jdbc:mysql://127.0.0.1:3306/jsh_erp?useUnicode=true&characterEncoding=utf8&useCursorFetch=true&defaultFetchSize=500&allowMultiQueries=true&rewriteBatchedStatements=true&useSSL=false
|
||||
spring.datasource.driverClassName=com.mysql.cj.jdbc.Driver
|
||||
spring.datasource.username=root
|
||||
spring.datasource.password=123456
|
||||
spring.datasource.password=Qweewqzzx1
|
||||
#mybatis-plus配置
|
||||
mybatis-plus.mapper-locations=classpath:./mapper_xml/*.xml
|
||||
# Redis
|
||||
spring.redis.host=127.0.0.1
|
||||
spring.redis.port=6379
|
||||
spring.redis.password=1234abcd
|
||||
spring.redis.password=
|
||||
#租户对应的角色id
|
||||
manage.roleId=10
|
||||
#租户允许创建的用户数
|
||||
|
||||
Reference in New Issue
Block a user