feat: drone.ci

This commit is contained in:
mozzie 2023-03-20 13:57:42 +08:00
parent a4e389e5d5
commit 8e7d237651
2 changed files with 44 additions and 6 deletions

View File

@ -9,7 +9,7 @@ export default (appInfo: MidwayAppInfo): MidwayConfig => {
* *
*/ */
type: 'mysql', type: 'mysql',
host: '172.31.0.15', host: 'backset-mysql',
port: 43306, port: 43306,
username: 'backset', username: 'backset',
password: 'backset', password: 'backset',
@ -25,7 +25,7 @@ export default (appInfo: MidwayAppInfo): MidwayConfig => {
}, },
redis: { redis: {
client: { client: {
host: '172.31.0.15', // Redis host host: 'backset-redis', // Redis host
port: 46379, // Redis port port: 46379, // Redis port
password: 'cr654654.', password: 'cr654654.',
db: 0, db: 0,

View File

@ -7,14 +7,52 @@ services:
context: ./ context: ./
dockerfile: Dockerfile.release dockerfile: Dockerfile.release
restart: always restart: always
container_name: backset-server # 容器名称 container_name: backset-server
ports: ports:
- "7001:7001" - "7001:7001"
networks: networks:
default: backset-net:
aliases: aliases:
- backset-server - backset-server
mysql:
image: mysql:5.7
restart: always
container_name: backset-mysql
ports:
- "46033:3306"
environment:
- MYSQL_DATABASE: "backset"
- MYSQL_USER: "backset"
- MYSQL_PASSWORD: "backset"
volumes:
- /www/wwwroot/mysql/conf/my.cnf:/etc/mysql/conf.d/mysqld.cnf
- /www/wwwroot/mysql/data:/var/lib/mysql
- /www/wwwroot/mysql/logs:/var/log/mysql
networks: networks:
default: backset-net:
external: backset.cn-net aliases:
- backset-mysql
redis:
image: redis
container_name: backset-redis
restart: always
ports:
- "26379:26379"
volumes:
- /www/wwwroot/redis/conf:/etc/redis/redis.conf
- /www/wwwroot/redis/data:/data
command: redis-server --appendonly yes --requirepass "cr654654."
networks:
backset-net:
aliases:
- backset-redis
networks:
backset-net:
ipam:
driver: default
config:
- subnet: "172.16.238.0/24"
- subnet: "2001:3984:3989::/64"