提交 dc0ba878 编写于 作者: 小傅哥's avatar 小傅哥

小傅哥,feat:maven 工程脚手架,增加redis安装

上级 16442f5b
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
### 1. 生成 ### 1. 生成
```shell ```shell
md5 ddd-scaffold-lite-1.0.pom > ddd-scaffold-lite-1.0.pom.md5 md5 ddd-scaffold-lite-1.1.pom > ddd-scaffold-lite-1.1.pom.md5
shasum ddd-scaffold-lite-1.0.pom > ddd-scaffold-lite-1.0.pom.sha1 shasum ddd-scaffold-lite-1.1.pom > ddd-scaffold-lite-1.1.pom.sha1
``` ```
```shell ```shell
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<groupId>io.github.fuzhengwei</groupId> <groupId>io.github.fuzhengwei</groupId>
<artifactId>ddd-scaffold-lite</artifactId> <artifactId>ddd-scaffold-lite</artifactId>
<version>1.0</version> <version>1.1</version>
<packaging>maven-archetype</packaging> <packaging>maven-archetype</packaging>
<name>ddd-scaffold-lite</name> <name>ddd-scaffold-lite</name>
...@@ -79,20 +79,20 @@ ...@@ -79,20 +79,20 @@
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<!-- <plugin>--> <plugin>
<!-- <groupId>org.apache.maven.plugins</groupId>--> <groupId>org.apache.maven.plugins</groupId>
<!-- <artifactId>maven-gpg-plugin</artifactId>--> <artifactId>maven-gpg-plugin</artifactId>
<!-- <version>1.5</version>--> <version>1.5</version>
<!-- <executions>--> <executions>
<!-- <execution>--> <execution>
<!-- <id>sign-artifacts</id>--> <id>sign-artifacts</id>
<!-- <phase>verify</phase>--> <phase>verify</phase>
<!-- <goals>--> <goals>
<!-- <goal>sign</goal>--> <goal>sign</goal>
<!-- </goals>--> </goals>
<!-- </execution>--> </execution>
<!-- </executions>--> </executions>
<!-- </plugin>--> </plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId> <artifactId>maven-release-plugin</artifactId>
......
...@@ -33,6 +33,7 @@ spring: ...@@ -33,6 +33,7 @@ spring:
connection-test-query: SELECT 1 connection-test-query: SELECT 1
type: com.zaxxer.hikari.HikariDataSource type: com.zaxxer.hikari.HikariDataSource
# MyBatis 配置【如需使用记得打开】
#mybatis: #mybatis:
# mapper-locations: classpath:/mybatis/mapper/*.xml # mapper-locations: classpath:/mybatis/mapper/*.xml
# config-location: classpath:/mybatis/config/mybatis-config.xml # config-location: classpath:/mybatis/config/mybatis-config.xml
......
# /usr/local/bin/docker-compose -f /docs/dev-ops/environment/environment-docker-compose-2.4.yml up -d # /usr/local/bin/docker-compose -f /docs/dev-ops/environment/environment-docker-compose-2.4.yml up -d
version: '3.8' version: '3.8'
# docker-compose -f docker-compose-1.0.yml up -d # docker-compose -f docker-compose-app.yml up -d
# 你需要修改system为你自身系统的仓库名 # 你需要修改system为你自身系统的仓库名
services: services:
x-api-app: ${artifactId}:
image: system/${artifactId}:${version} image: system/${artifactId}:${version}
container_name: ${artifactId} container_name: ${artifactId}
restart: on-failure restart: on-failure
......
# 命令执行 docker-compose -f docker-compose-environment.yml up -d
version: '3.9'
services:
mysql:
image: mysql:8.0.32
container_name: mysql
command: --default-authentication-plugin=mysql_native_password
restart: always
environment:
TZ: Asia/Shanghai
MYSQL_ROOT_PASSWORD: 123456
networks:
- my-network
depends_on:
- mysql-job-dbdata
ports:
- "13306:3306"
volumes:
- ./mysql/sql:/docker-entrypoint-initdb.d
healthcheck:
test: [ "CMD", "mysqladmin" ,"ping", "-h", "localhost" ]
interval: 5s
timeout: 10s
retries: 10
start_period: 15s
volumes_from:
- mysql-job-dbdata
# 自动加载数据
mysql-job-dbdata:
image: alpine:3.18.2
container_name: mysql-job-dbdata
volumes:
- /var/lib/mysql
# phpmyadmin https://hub.docker.com/_/phpmyadmin
phpmyadmin:
image: phpmyadmin:5.2.1
container_name: phpmyadmin
hostname: phpmyadmin
ports:
- 8899:80
environment:
- PMA_HOST=mysql
- PMA_PORT=3306
- MYSQL_ROOT_PASSWORD=123456
depends_on:
mysql:
condition: service_healthy
networks:
- my-network
# Redis
redis:
image: redis:6.2
container_name: redis
restart: always
hostname: redis
privileged: true
ports:
- 16379:6379
volumes:
- ./redis/redis.conf:/usr/local/etc/redis/redis.conf
command: redis-server /usr/local/etc/redis/redis.conf
networks:
- my-network
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
interval: 10s
timeout: 5s
retries: 3
# RedisAdmin https://github.com/joeferner/redis-commander
redis-admin:
image: spryker/redis-commander:0.8.0
container_name: redis-admin
hostname: redis-commander
restart: always
ports:
- 8081:8081
environment:
- REDIS_HOSTS=local:redis:6379
- HTTP_USER=admin
- HTTP_PASSWORD=admin
- LANG=C.UTF-8
- LANGUAGE=C.UTF-8
- LC_ALL=C.UTF-8
networks:
- my-network
depends_on:
redis:
condition: service_healthy
networks:
my-network:
driver: bridge
\ No newline at end of file
# 命令执行 docker-compose up -d
version: '3.9'
services:
mysql:
image: mysql:8.0.32
container_name: mysql
command: --default-authentication-plugin=mysql_native_password
restart: always
environment:
TZ: Asia/Shanghai
# MYSQL_ALLOW_EMPTY_PASSWORD: 'yes' # 可配置无密码,注意配置 SPRING_DATASOURCE_PASSWORD=
MYSQL_ROOT_PASSWORD: 123456
MYSQL_USER: xfg
MYSQL_PASSWORD: 123456
depends_on:
- mysql-job-dbdata
ports:
- "3306:3306"
volumes:
- ./sql:/docker-entrypoint-initdb.d
volumes_from:
- mysql-job-dbdata
# 自动加载数据
mysql-job-dbdata:
image: alpine:3.18.2
container_name: mysql-job-dbdata
volumes:
- /var/lib/mysql
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册