Former-commit-id: 97d25b6e669424a5066fcb22bd1d37b209dfa557
Former-commit-id: 174a6a0e7481474081f2a91b89706ebc5939d373
TSXN
wanggang 5 years ago
commit b4452bf6da

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
@ -8,7 +8,7 @@
<ItemGroup>
<PackageReference Include="Confluent.Kafka" Version="1.5.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="3.1.8" />
<PackageReference Include="MySql.Data" Version="8.0.21" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
</ItemGroup>
</Project>
</Project>

@ -1,5 +1,7 @@
using Confluent.Kafka;
using Microsoft.EntityFrameworkCore;
using MySqlConnector;
using Newtonsoft.Json;
using System;
using System.Threading;
using System.Threading.Tasks;
@ -8,8 +10,9 @@ namespace KafkaEFTest
{
internal class Program
{
static TimeSpan DefaultTimeout = TimeSpan.FromSeconds(30);
private static void Main(string[] args)
private static readonly TimeSpan DefaultTimeout = TimeSpan.FromSeconds(30);
private static void Main()
{
using (var db = new TestDbContext())
{
@ -17,31 +20,37 @@ namespace KafkaEFTest
}
Task.Run(async () =>
{
var topic = "test-topic";
var config = new ProducerConfig
{
BootstrapServers = "localhost:9092",
TransactionalId = "test",
};
while (true)
{
var entity = new TestEntity();
using (var db = new TestDbContext())
using (var dbContext = new TestDbContext())
{
try
{
using (var p = new ProducerBuilder<Null, string>(new ProducerConfig { BootstrapServers = "localhost:9092", TransactionalId = entity.Id.ToString() }).Build())
using (var producer = new ProducerBuilder<string, string>(config).Build())
{
try
{
p.InitTransactions(DefaultTimeout);
p.BeginTransaction();
db.Database.BeginTransaction();
db.Tests.Add(entity);
db.SaveChanges();
var dr = await p.ProduceAsync("test-topic", new Message<Null, string> { Value = entity.Id + ":" + entity.Value });
db.Database.CommitTransaction();
p.CommitTransaction(DefaultTimeout);
Console.WriteLine($"Delivered '{dr.Value}' to '{dr.TopicPartitionOffset}'");
var entity = new TestEntity();
producer.InitTransactions(DefaultTimeout);
producer.BeginTransaction();
dbContext.Database.BeginTransaction();
dbContext.Tests.Add(entity);
dbContext.SaveChanges();
var dr = await producer.ProduceAsync(topic, new Message<string, string> { Key = "test_table", Value = JsonConvert.SerializeObject(entity) });
dbContext.Database.CommitTransaction();
producer.CommitTransaction(DefaultTimeout);
Console.WriteLine($"send message offset: '{dr.TopicPartitionOffset}' value: '{dr.Value}");
}
catch (Exception ex)//DbUpdateException//ProduceException<Null,string>
{
db.Database.RollbackTransaction();
p.AbortTransaction(DefaultTimeout);
dbContext.Database.RollbackTransaction();
producer.AbortTransaction(DefaultTimeout);
Console.WriteLine(ex.Message);
}
}
@ -57,13 +66,17 @@ namespace KafkaEFTest
});
var conf = new ConsumerConfig
{
GroupId = "test-consumer-group",
GroupId = "group_test",
BootstrapServers = "localhost:9092",
AutoOffsetReset = AutoOffsetReset.Earliest
EnableAutoCommit = false,
StatisticsIntervalMs = 5000,
SessionTimeoutMs = 6000,
AutoOffsetReset = AutoOffsetReset.Earliest,
EnablePartitionEof = true
};
using (var c = new ConsumerBuilder<Ignore, string>(conf).Build())
using (var consumer = new ConsumerBuilder<string, string>(conf).Build())
{
c.Subscribe("test-topic");
consumer.Subscribe("test-topic");
CancellationTokenSource cts = new CancellationTokenSource();
Console.CancelKeyPress += (_, e) =>
@ -78,8 +91,26 @@ namespace KafkaEFTest
{
try
{
var cr = c.Consume(cts.Token);
Console.WriteLine($"Consumed message '{cr.Value}' at: '{cr.TopicPartitionOffset}'.");
var consumeResult = consumer.Consume(cts.Token);
if (consumeResult.IsPartitionEOF)
{
Console.WriteLine(
$"Reached end of topic {consumeResult.Topic}, partition {consumeResult.Partition}, offset {consumeResult.Offset}.");
continue;
}
Console.WriteLine($"group received message offset: '{consumeResult.TopicPartitionOffset}' key: {consumeResult.Message.Key} value: '{consumeResult.Message.Value}'");
Doris(consumeResult.Value);
try
{
consumer.Commit(consumeResult);
}
catch (KafkaException e)
{
Console.WriteLine($"Commit error: {e.Error.Reason}");
}
}
catch (ConsumeException e)
{
@ -90,10 +121,51 @@ namespace KafkaEFTest
catch (OperationCanceledException)
{
// Ensure the consumer leaves the group cleanly and final offsets are committed.
c.Close();
consumer.Close();
}
}
}
//create database test;
//CREATE USER 'usr' IDENTIFIED BY 'pwd';
//GRANT ALL ON test TO usr;
//CREATE TABLE IF NOT EXISTS test
//(
// `id` VARCHAR(64),
// `value` VARCHAR(128),
// `number` INT
//)
//UNIQUE KEY(`id`)
//distributed by hash(id) buckets 1
//properties(
// "replication_num" = "1"
//);
private static void Doris(string value)
{
try
{
var entity = JsonConvert.DeserializeObject<TestEntity>(value);
var connectionString = "Server=localhost;Port=9030;Database=test;Uid=usr;Pwd=pwd;";
using (var conn = new MySqlConnection(connectionString))
{
conn.Open();
using (var cmd = conn.CreateCommand())
{
cmd.CommandTimeout = 60;
cmd.CommandText = $"insert into test (`id`,`value`,`number`) values ('{entity.Id}','{entity.Value}',{entity.Number})";
cmd.ExecuteNonQuery();
}
}
}
catch (Exception ex)
{
Console.WriteLine(ex.GetType().FullName);
//"Unknown database 'default_cluster:test'"
//errCode = 2, detailMessage = Unknown table 'test'
throw;
}
}
}
public class TestDbContext : DbContext
@ -112,9 +184,11 @@ namespace KafkaEFTest
{
this.Id = Guid.NewGuid();
this.Value = DateTime.Now.Ticks.ToString();
this.Number = new Random((int)DateTime.Now.Ticks).Next();
}
public Guid Id { get; set; }
public string Value { get; set; }
public int Number { get; set; }
}
}

@ -8,27 +8,55 @@ networks:
services:
zookeeper:
image: wurstmeister/zookeeper:latest
restart: always
ports:
- 2181:2181
networks:
default:
ipv4_address: 172.172.0.171
ipv4_address: 172.172.0.201
kafka:
image: wurstmeister/kafka:2.13-2.6.0
restart: always
environment:
KAFKA_ZOOKEEPER_CONNECT: 172.172.0.171:2181
KAFKA_ADVERTISED_HOST_NAME: 172.172.0.170
KAFKA_ZOOKEEPER_CONNECT: 172.172.0.201:2181
KAFKA_ADVERTISED_HOST_NAME: localhost
KAFKA_HEAP_OPTS: "-Xmx256m -Xms256m"
volumes:
- ./docker/data/kafka:/kafka
ports:
- 9092:9092
networks:
default:
ipv4_address: 172.172.0.210
kafka-manager:
image: sheepkiller/kafka-manager
restart: always
environment:
ZK_HOSTS: 172.172.0.201
KAFKA_BROKERS: 172.172.0.210:9092
ports:
- "9010:9000"
networks:
default:
ipv4_address: 172.172.0.220
doris:
image: doris:0.12.0
restart: always
environment:
TZ: "Asia/Shanghai"
volumes:
- /etc/localtime:/etc/localtime
- /var/run/docker.sock:/var/run/docker.sock
#- ./conf/fe.conf:/opt/fe/conf/fe.conf
- ./log/fe:/opt/fe/log
- ./data/fe/doris-meta:/opt/fe/doris-meta
- ./conf/be.conf:/opt/be/conf/be.conf
#- ./conf/be.conf:/opt/be/conf/be.conf
- ./data/be/storage:/opt/be/storage
ports:
- 9092:9092
- 8081:8081
- 8030:8030
- 9030:9030
- 9050:9050
command: bash -c "/opt/fe/bin/start_fe.sh & /opt/be/bin/start_be.sh"
#mysql -h 127.0.0.1 -P9030 -u root -e 'ALTER SYSTEM ADD BACKEND "172.172.0.30:9050"'
networks:
default:
ipv4_address: 172.172.0.170
ipv4_address: 172.172.0.30

@ -0,0 +1 @@
docker-compose -f docker-compose.yml up --remove-orphans --force-recreate -d

@ -0,0 +1 @@
docker-compose down --remove-orphans

@ -1,4 +1,4 @@
<template>
<template>
<div class="card camera" style="box-sizing:border-box;height:490px;margin:10px;">
<div class="card-header">
{{device.displayName}}
@ -23,21 +23,21 @@
<tr>
<td></td>
<td></td>
<td><img @click="execApi(device.number,'/Onvif/Up')" src="/images/up.svg" style="width:32px;" /></td>
<td><img @click="execApi(device.number,'/Onvif/Up')" src="images/up.svg" style="width:32px;" /></td>
<td></td>
<td></td>
</tr>
<tr>
<td><img @click="execApi(device.number,'/Onvif/Zoomin')" src="/images/zoomin.svg" style="width:32px;" /></td>
<td><img @click="execApi(device.number,'/Onvif/Left')" src="/images/left.svg" style="width:32px;" /></td>
<td><img @click="execApi(device.number,'/Onvif/Stop')" src="/images/stop.svg" style="width:32px;" /></td>
<td><img @click="execApi(device.number,'/Onvif/Right')" src="/images/right.svg" style="width:32px;" /></td>
<td><img @click="execApi(device.number,'/Onvif/Zoomout')" src="/images/zoomout.svg" style="width:32px;" /></td>
<td><img @click="execApi(device.number,'/Onvif/Zoomin')" src="images/zoomin.svg" style="width:32px;" /></td>
<td><img @click="execApi(device.number,'/Onvif/Left')" src="images/left.svg" style="width:32px;" /></td>
<td><img @click="execApi(device.number,'/Onvif/Stop')" src="images/stop.svg" style="width:32px;" /></td>
<td><img @click="execApi(device.number,'/Onvif/Right')" src="images/right.svg" style="width:32px;" /></td>
<td><img @click="execApi(device.number,'/Onvif/Zoomout')" src="images/zoomout.svg" style="width:32px;" /></td>
</tr>
<tr>
<td></td>
<td></td>
<td><img @click="execApi(device.number,'/Onvif/Down')" src="/images/down.svg" style="width:32px;" /></td>
<td><img @click="execApi(device.number,'/Onvif/Down')" src="images/down.svg" style="width:32px;" /></td>
<td></td>
<td></td>
</tr>
@ -47,8 +47,7 @@
</div>
</div>
</template>
<script>
export default {
<script>export default {
props: ['device', 'edit'],
data() {
return {
@ -261,5 +260,4 @@
return false;
}
}
};
</script>
};</script>

@ -1,4 +1,4 @@
<template>
<template>
<div class="card color-light" style="box-sizing:border-box;height:150px;margin:10px;">
<div class="card-header">
{{device.displayName}}
@ -18,8 +18,8 @@
</div>
</div>
<div class="col-2 align-self-center text-center">
<img style="height:32px;" v-if="getDeviceDataValue(device,'状态')==='开'" @click="execApi(device.number,'/Socket/Off')" src="/images/on.svg" />
<img style="height:32px;" v-else="getDeviceDataValue(device,'状态')==='关'" @click="execApi(device.number,'/Socket/On')" src="/images/off.svg" />
<img style="height:32px;" v-if="getDeviceDataValue(device,'状态')==='开'" @click="execApi(device.number,'/Socket/Off')" src="images/on.svg" />
<img style="height:32px;" v-else="getDeviceDataValue(device,'状态')==='关'" @click="execApi(device.number,'/Socket/On')" src="images/off.svg" />
</div>
</div>
</div>

@ -1,4 +1,4 @@
<template>
<template>
<div class="card" style="box-sizing:border-box;height:150px;margin:10px;">
<div class="card-header">
{{device.displayName}}
@ -13,17 +13,15 @@
<div class="col-8 align-self-center">
<div class="row" style="line-height:28px;">
<span class="badge badge-info" style="line-height:26px;">{{getDeviceDataValue(device,'状态')}}</span>
<img style="height:32px;" @click="execApi(device.number,'/Curtain/On')" src="/images/left.svg" />
<img style="height:32px;" @click="execApi(device.number,'/Curtain/Stop')" src="/images/stop.svg" />
<img style="height:32px;" @click="execApi(device.number,'/Curtain/Off')" src="/images/right.svg" />
<img style="height:32px;" @click="execApi(device.number,'/Curtain/On')" src="images/left.svg" />
<img style="height:32px;" @click="execApi(device.number,'/Curtain/Stop')" src="images/stop.svg" />
<img style="height:32px;" @click="execApi(device.number,'/Curtain/Off')" src="images/right.svg" />
</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
<script>export default {
props: ['device']
};
</script>
};</script>

@ -13,16 +13,15 @@
<div class="col-8 align-self-center">
<div class="row" style="line-height:28px;">
<!--<span class="badge badge-info" style="line-height:26px;">{{getDeviceDataValue(device,'状态')}}</span>-->
<img style="height:32px;" @click="open" src="/images/on.svg" />
<!--<img style="height:32px;" @click="close" src="/IoTCenter/images/off.svg" />-->
<img style="height:32px;" @click="open" src="images/on.svg" />
<!--<img style="height:32px;" @click="close" src="/IoTCenterimages/off.svg" />-->
</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
<script>export default {
props: ['device'],
methods: {
open: function () {
@ -38,5 +37,4 @@
}
}
}
};
</script>
};</script>

@ -1,4 +1,4 @@
<template>
<template>
<div class="card" style="box-sizing:border-box;height:150px;margin:10px;">
<div class="card-header">
{{device.displayName}}
@ -14,16 +14,15 @@
<div class="row" style="line-height:28px;">
<span class="badge badge-info" style="line-height:26px; margin-right: 10px;" v-if="isSmart">{{electricity}} kW‧h</span>
<span class="badge badge-info" style="line-height:26px; margin-right: 10px;" v-if="isSmart">{{power}} W</span>
<img style="height:32px;" v-if="getDeviceDataValue(device,'状态')==='开'" @click="execApi(device.number,'/Socket/Off')" src="/images/on.svg" />
<img style="height:32px;" v-else="getDeviceDataValue(device,'状态')==='关'" @click="execApi(device.number,'/Socket/On')" src="/images/off.svg" />
<img style="height:32px;" v-if="getDeviceDataValue(device,'状态')==='开'" @click="execApi(device.number,'/Socket/Off')" src="images/on.svg" />
<img style="height:32px;" v-else="getDeviceDataValue(device,'状态')==='关'" @click="execApi(device.number,'/Socket/On')" src="images/off.svg" />
</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
<script>export default {
props: ['device'],
computed: {
isSmart: function () {
@ -36,5 +35,4 @@
return parseFloat(this.getDeviceDataValue(this.device, '功率') || 0).toFixed(2);
}
}
};
</script>
};</script>

@ -1,4 +1,4 @@
<template>
<template>
<div class="card" style="box-sizing:border-box;height:150px;margin:10px;">
<div class="card-header">
{{device.displayName}}
@ -12,16 +12,14 @@
</div>
<div class="col-8 align-self-center">
<div class="row" style="line-height:28px;">
<img style="height:32px;" v-if="getDeviceDataValue(device,'状态')=='开'" @click="execApi(device.number,'/Switch/Off')" src="/images/on.svg" />
<img style="height:32px;" v-if="getDeviceDataValue(device,'状态')=='关'" @click="execApi(device.number,'/Switch/On')" src="/images/off.svg" />
<img style="height:32px;" v-if="getDeviceDataValue(device,'状态')=='开'" @click="execApi(device.number,'/Switch/Off')" src="images/on.svg" />
<img style="height:32px;" v-if="getDeviceDataValue(device,'状态')=='关'" @click="execApi(device.number,'/Switch/On')" src="images/off.svg" />
</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
<script>export default {
props: ['device']
};
</script>
};</script>

@ -1,4 +1,4 @@
<template>
<template>
<div class="card" style="box-sizing:border-box;height:150px;margin:10px;">
<div class="card-header">
{{device.displayName}}
@ -12,20 +12,18 @@
</div>
<div class="col-8 align-self-center">
<div class="row" style="line-height:28px;">
<img style="height:32px;" v-if="getDeviceDataValue(device,'L1状态')=='开'" @click="execApi(device.number,'/Switch3/L1Off')" src="/images/on.svg" />
<img style="height:32px;" v-if="getDeviceDataValue(device,'L1状态')=='关'" @click="execApi(device.number,'/Switch3/L1On')" src="/images/off.svg" />
<img style="height:32px;" v-if="getDeviceDataValue(device,'L2状态')=='开'" @click="execApi(device.number,'/Switch3/L2Off')" src="/images/on.svg" />
<img style="height:32px;" v-if="getDeviceDataValue(device,'L2状态')=='关'" @click="execApi(device.number,'/Switch3/L2On')" src="/images/off.svg" />
<img style="height:32px;" v-if="getDeviceDataValue(device,'L3状态')=='开'" @click="execApi(device.number,'/Switch3/L3Off')" src="/images/on.svg" />
<img style="height:32px;" v-if="getDeviceDataValue(device,'L3状态')=='关'" @click="execApi(device.number,'/Switch3/L3On')" src="/images/off.svg" />
<img style="height:32px;" v-if="getDeviceDataValue(device,'L1状态')=='开'" @click="execApi(device.number,'/Switch3/L1Off')" src="images/on.svg" />
<img style="height:32px;" v-if="getDeviceDataValue(device,'L1状态')=='关'" @click="execApi(device.number,'/Switch3/L1On')" src="images/off.svg" />
<img style="height:32px;" v-if="getDeviceDataValue(device,'L2状态')=='开'" @click="execApi(device.number,'/Switch3/L2Off')" src="images/on.svg" />
<img style="height:32px;" v-if="getDeviceDataValue(device,'L2状态')=='关'" @click="execApi(device.number,'/Switch3/L2On')" src="images/off.svg" />
<img style="height:32px;" v-if="getDeviceDataValue(device,'L3状态')=='开'" @click="execApi(device.number,'/Switch3/L3Off')" src="images/on.svg" />
<img style="height:32px;" v-if="getDeviceDataValue(device,'L3状态')=='关'" @click="execApi(device.number,'/Switch3/L3On')" src="images/off.svg" />
</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
<script>export default {
props: ['device']
};
</script>
};</script>

@ -1,16 +1,14 @@
<template>
<template>
<a ref="fancybox" style="display:block;" :href="src"><img style="height:32px;" :src="src" /></a>
</template>
<script>
export default {
<script>export default {
props: ['value'],
mounted: function () {
$(this.$refs.fancybox).fancybox();
},
computed: {
src: function () {
return this.value || '/images/empty.png';
return this.value || 'images/empty.png';
}
}
};
</script>
};</script>

@ -1,10 +1,9 @@
<template>
<template>
<div>
<textarea :name="name">{{value}}</textarea>
</div>
</template>
<script>
export default {
<script>export default {
props: ['name', 'value'], watch: {
value(val) {
this.$emit('update:value', val)
@ -24,8 +23,7 @@
},
computed: {
src: function () {
return this.value || '/images/empty.png';
return this.value || 'images/empty.png';
}
}
};
</script>
};</script>

@ -1,4 +1,4 @@
<template>
<template>
<div>
<input ref="input" type="text" style="visibility: hidden; position: absolute;" :value="currentValue" />
<a ref="link" :href="src"><img ref="img" style="height:32px;" :src="src" /></a>
@ -6,8 +6,7 @@
<button ref="btn" class="btn btn-sm btn-default" type="button" id="btn_Image" style="margin-top:5px;">上传</button>
</div>
</template>
<script>
export default {
<script>export default {
props: ['name', 'value', 'data'],
data: function () {
return {
@ -49,8 +48,7 @@
},
computed: {
src: function () {
return this.currentValue || '/images/empty.png';
return this.currentValue || 'images/empty.png';
}
}
};
</script>
};</script>

@ -382,8 +382,7 @@
</footer>
</div>
</template>
<script>
export default {
<script>export default {
data: function () {
return {
version: config.version,
@ -392,7 +391,7 @@
openKeys: ['sub1'],
url: config.baseUrl + '/IoTCenter/api/v1/site/getSite',
data: {
logo: '/images/logo.png',
logo: 'images/logo.png',
copyright: '',
version: '',
username: '',
@ -456,5 +455,4 @@
return window.location.protocol + "//" + window.location.hostname + ":" + port;
}
}
}
</script>
}</script>

@ -13,7 +13,7 @@
<link rel="stylesheet" href="lib/weui/style/weui.min.css" />
<link rel="stylesheet" href="lib/fancybox/jquery.fancybox.min.css" />
<link rel="stylesheet" href="lib/sweetalert2/dist/minimal.min.css" />
<link rel="stylesheet" href="/IoTCenter/lib/kindeditor/themes/default/default.css">
<link rel="stylesheet" href="lib/kindeditor/themes/default/default.css">
<link rel="stylesheet" href="lib/tree-multiselect/jquery.tree-multiselect.min.css" />
<link rel="stylesheet" href="lib/jqcron/jqCron.css" />
<link rel="stylesheet" href="css/site.css" />

@ -1,25 +1,25 @@
Vue.component('pagination', function (resolve, reject) {
axios.get("/components/shared/pagination.html").then(function (response) {
axios.get("components/shared/pagination.html").then(function (response) {
resolve(parseModel(response));
});
});
Vue.component('layout', function (resolve, reject) {
axios.get("/components/shared/layout.html").then(function (response) {
axios.get("components/shared/layout.html").then(function (response) {
resolve(parseModel(response));
});
});
Vue.component('list', function (resolve, reject) {
axios.get("/components/shared/list.html").then(function (response) {
axios.get("components/shared/list.html").then(function (response) {
resolve(parseModel(response));
});
});
Vue.component('display', function (resolve, reject) {
axios.get("/components/shared/display.html").then(function (response) {
axios.get("components/shared/display.html").then(function (response) {
resolve(parseModel(response));
});
});
Vue.component('update', function (resolve, reject) {
axios.get("/components/shared/update.html").then(function (response) {
axios.get("components/shared/update.html").then(function (response) {
resolve(parseModel(response));
});
});
});

@ -21,6 +21,6 @@
];
for (var i = 0; i < formComponents.length; i++) {
var name = formComponents[i];
var url = "/components/shared/" + name.replace('-', '/') + ".html";
var url = "components/shared/" + name.replace('-', '/') + ".html";
vueComponent(name, url);
}

@ -88,7 +88,7 @@ var iotComponents = [
];
for (var i = 0; i < iotComponents.length; i++) {
var name = 'iot-'+iotComponents[i];
var url = "/components/iot/" + iotComponents[i] + ".html";
var url = "components/iot/" + iotComponents[i] + ".html";
vueComponent(name, url);
}
var deviceInfo = [];

@ -19,7 +19,7 @@ router.beforeEach((to, from, next) => {
var name = url.replace(/\//g, "-").replace(/\./g, "-").substring(1);
var route = routes[name];
if (!route) {
axios.get(url).then(function (response) {
axios.get(url.substring(1)).then(function (response) {
var model = parseModel(response);
route = {
name: name,

@ -1,4 +1,4 @@
user root;
user root;
worker_processes 4;
#error_log logs/error.log;
#error_log logs/error.log notice;
@ -16,26 +16,32 @@ http {
keepalive_timeout 65;
types {
application/vnd.android.package-archive apk;
application/iphone pxl ipa;
text/plain plist;
application/iphone pxl ipa;
text/plain plist;
}
upstream gateway {
server 172.172.0.12;
}
server {
listen 80;
server_name iot.edusoa.com;
return 301 https://$host$request_uri;
}
server {
#listen 80;
listen 443;
server_name iot.edusoa.com;
ssl on;
ssl_certificate edusoa.pem;
ssl_certificate_key edusoa.key;
ssl_session_timeout 5m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!RC4:!MD5:!aNULL:!eNULL:!NULL:!DH:!EDH:!EXP:+MEDIUM;
ssl_prefer_server_ciphers on;
ssl on;
ssl_certificate edusoa.pem;
ssl_certificate_key edusoa.key;
ssl_session_timeout 5m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!RC4:!MD5:!aNULL:!eNULL:!NULL:!DH:!EDH:!EXP:+MEDIUM;
ssl_prefer_server_ciphers on;
location / {
root /root/nginx/html/desktop;

@ -1,32 +0,0 @@
#docker-compose up -d
version: "3.8"
services:
zookeeper:
image: wurstmeister/zookeeper:latest
restart: always
ports:
- 2181:2181
networks:
default:
ipv4_address: 172.172.0.201
kafka:
image: wurstmeister/kafka:2.13-2.6.0
restart: always
environment:
KAFKA_ZOOKEEPER_CONNECT: 172.172.0.201:2181
KAFKA_ADVERTISED_HOST_NAME: localhost
KAFKA_HEAP_OPTS: "-Xmx256m -Xms256m"
volumes:
- ./docker/data/kafka:/kafka
ports:
- 9092:9092
networks:
default:
ipv4_address: 172.172.0.210
kafka-manager:
image: sheepkiller/kafka-manager
environment:
ZK_HOSTS: 172.172.0.201
KAFKA_BROKERS: 172.172.0.210:9092
ports:
- "9010:9000"

@ -29,7 +29,7 @@ http {
server_name localhost;
location / {
root /root/nginx/html/desktop;
root /root/nginx/html;
if ($http_user_agent ~* "(mobile|android|ipad|iphone|ipod|tablet)") {
root /root/nginx/html/mobile;
}

@ -1 +0,0 @@
docker-compose -f docker-compose.yml -f docker-compose.override.yml -f docker-compose.temp.yml up --remove-orphans -d
Loading…
Cancel
Save