添加数据库compose文件

pull/1/head
潘建东 8 months ago
parent 5fd5b7854e
commit eb63fd5088

@ -40,25 +40,25 @@ namespace ZKLT.Hadoop.API
app.UseCors("all");
#endregion
//app.UseHadoop((c) =>
//{
// c.Host = "127.0.0.1";
// c.Account = "root";
// c.PassWord = "root";
// c.Key = "devdb";
// c.Port = 3306;
//});
app.UseHadoop((c) =>
{
c.Host = "172.17.0.1";
c.Host = "127.0.0.1";
c.Account = "root";
c.PassWord = "root";
c.Key = "testdb";
c.Port = 4000;
c.Key = "hadoopdb";
c.Port = 3306;
});
//app.UseHadoop((c) =>
//{
// c.Host = "172.17.0.1";
// c.Account = "root";
// c.PassWord = "root";
// c.Key = "testdb";
// c.Port = 4000;
//});
//app.UseHadoop((c) =>
//{
// c.Host = "118.195.165.218";

@ -127,13 +127,6 @@ namespace ZKLT.Hadoop
{
throw new Exception("初始化数据列失败");
}
//var _file = HDP_Table.Class2Table<HDP_File>();
//_Tables.Add(_file);
//if (!_TableService.InitStruct(_Source, _file))
//{
// throw new Exception("初始化文件失败");
//}
}
/// <summary>

@ -13,6 +13,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ZKLT.Hadoop.Interface", "Ha
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ZKLT.Hadoop.API", "Hadoop\ZKLT.Hadoop.API\ZKLT.Hadoop.API.csproj", "{398DF3E5-B94B-4B2E-9DC6-B6741D7CF4DB}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docker-compose", "docker-compose", "{1E26F2C2-6BCB-4E5D-ADC5-C6AD923155F9}"
ProjectSection(SolutionItems) = preProject
docker-compose\mysql.yml = docker-compose\mysql.yml
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU

@ -0,0 +1,20 @@
version: '3'
services:
hadoop_mysql:
restart: always
image: mysql:8
container_name: hadoop_mysql
# volumes:
# - /apps/mysql/mydir:/mydir
# - /apps/mysql/datadir:/var/lib/mysql
# - /apps/mysql/conf/my.cnf:/etc/my.cnf
# # 数据库还原目录 可将需要还原的sql文件放在这里
# - /apps/mysql/source:/docker-entrypoint-initdb.d
environment:
- "MYSQL_ROOT_PASSWORD=root"
- "MYSQL_DATABASE=hadoopdb"
- "TZ=Asia/Shanghai"
ports:
# 使用宿主机的3306端口映射到容器的3306端口
# 宿主机:容器
- 3306:3306
Loading…
Cancel
Save