项目结构变更

pull/1/head
潘建东 8 months ago
parent 6ce095a3ce
commit 21ff745b29

@ -52,11 +52,11 @@ namespace ZKLT.Hadoop.API
app.UseHadoop((c) =>
{
c.Host = "172.17.0.1";
c.Account = "root";
c.PassWord = "Panjiandong1994";
c.Key = "erpdb";
c.Port = 3306;
c.Host = app.Configuration["ConnectionStrings:Host"];
c.Account = app.Configuration["ConnectionStrings:Account"];
c.PassWord = app.Configuration["ConnectionStrings:PassWord"];
c.Key = app.Configuration["ConnectionStrings:Key"];
c.Port = Convert.ToInt32(app.Configuration["ConnectionStrings:Port"]);
});
//app.UseHadoop((c) =>

@ -4,5 +4,12 @@
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"ConnectionStrings": {
"Host": "127.0.0.1",
"Account": "root",
"PassWord": "root",
"Key": "hadoopdb",
"Port": "3306"
}
}

@ -5,5 +5,12 @@
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*"
"AllowedHosts": "*",
"ConnectionStrings": {
"Host": "host.docker.internal",
"Account": "root",
"PassWord": "Panjiandong1994",
"Key": "erptestdb",
"Port": "3306"
}
}

@ -0,0 +1 @@
docker build -f ./Dockerfile -t hadoop:1.0.0 ../../.

@ -2,9 +2,10 @@ version: '3'
services:
hadoop:
restart: always
image: hadoop:latest
image: hadoop:1.0.0
container_name: hadoop
# volumes:
volumes:
- ./appsettings.json:/app/appsettings.json
# - /apps/mysql/mydir:/mydir
# - /apps/mysql/datadir:/var/lib/mysql
# - /apps/mysql/conf/my.cnf:/etc/my.cnf
@ -15,4 +16,5 @@ services:
ports:
# 使用宿主机的3306端口映射到容器的3306端口
# 宿主机:容器
- 5000:8080
- 5000:8080
network_mode: bridge

@ -1 +0,0 @@
docker build -f Hadoop\ZKLT.Hadoop.API\Dockerfile -t hadoop:latest .

@ -13,12 +13,6 @@ 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\hadoop.yml = docker-compose\hadoop.yml
docker-compose\mysql.yml = docker-compose\mysql.yml
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU

@ -1,20 +0,0 @@
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