Skip to content

Commit 363ec41

Browse files
committed
Fix configuration on docker without Fabio and Consul
1 parent 3ba5662 commit 363ec41

File tree

14 files changed

+100
-61
lines changed

14 files changed

+100
-61
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -211,11 +211,11 @@ Use [**api-workbench**](./api-workbench.rest) inside Visual Studio code with [RE
211211
"password": "test",
212212
"rawData": ""
213213
},
214-
"issuer": "demo",
215-
"validIssuer": "demo",
214+
"issuer": "genocs-identity-service",
215+
"validIssuer": "genocs-identity-service",
216216
"validateAudience": false,
217-
"validateIssuer": false,
218-
"validateLifetime": false,
217+
"validateIssuer": true,
218+
"validateLifetime": true,
219219
"expiry": "01:00:00"
220220
},
221221
"metrics": {

containers/prometheus/prometheus.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,20 @@ scrape_configs:
99

1010
- job_name: "api-gateway"
1111
static_configs:
12-
- targets: ["api-gateway:5500"]
12+
- targets: ["api-gateway"]
1313

14-
- job_name: "identity-service"
15-
static_configs:
16-
- targets: ["identity-service:5501"]
17-
18-
- job_name: "products-service"
19-
static_configs:
20-
- targets: ["products-service:5002"]
21-
22-
- job_name: "orders-service"
23-
static_configs:
24-
- targets: ["orders-service:5503"]
25-
26-
- job_name: "signalr-service"
27-
static_configs:
28-
- targets: ["signalr-service:5504"]
14+
- job_name: "identity-service"
15+
static_configs:
16+
- targets: ["identity-service"]
17+
18+
- job_name: "products-service"
19+
static_configs:
20+
- targets: ["products-service"]
21+
22+
- job_name: "orders-service"
23+
static_configs:
24+
- targets: ["orders-service"]
25+
26+
- job_name: "signalr-service"
27+
static_configs:
28+
- targets: ["signalr-service"]

src/Genocs.Auth/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ Following are the project settings needed to enable monitoring
2626
"password": "test",
2727
"rawData": ""
2828
},
29-
"issuer": "identity",
30-
"validIssuer": "identity",
29+
"issuer": "genocs-identity-service",
30+
"validIssuer": "genocs-identity-service",
3131
"validateAudience": false,
3232
"validateIssuer": true,
3333
"validateLifetime": true,
34-
"expiry": "01:00:00"
34+
"expiry": "01:00:00"
3535
}
3636
```
3737

src/Genocs.Core.Demo.WebApi/appsettings.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@
3737
"ConnectionString": "mongodb://localhost",
3838
"Database": "demo"
3939
},
40-
"JWT": {
40+
"jwt": {
4141
"ValidIssuer": "http://localhost/Auth",
4242
"ValidAudience": "https://localhost:5000",
4343
"Secret": "<<>>"
4444
},
4545
"Monitoring": {
4646
"Jaeger": "localhost"
4747
}
48-
}
48+
}

src/Genocs.Core.Demo.Worker/appsettings.json

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,11 @@
6767
},
6868
"logger": {
6969
"level": "information",
70-
"excludePaths": [ "/", "/ping", "/metrics" ],
70+
"excludePaths": [
71+
"/",
72+
"/ping",
73+
"/metrics"
74+
],
7175
"excludeProperties": [
7276
"api_key",
7377
"access_key",
@@ -112,16 +116,20 @@
112116
"udpPort": 6831,
113117
"maxPacketSize": 65000,
114118
"sampler": "const",
115-
"excludePaths": [ "/", "/ping", "/metrics" ]
119+
"excludePaths": [
120+
"/",
121+
"/ping",
122+
"/metrics"
123+
]
116124
},
117125
"jwt": {
118126
"certificate": {
119127
"location": "certs/localhost.pfx",
120128
"password": "test",
121129
"rawData": ""
122130
},
123-
"issuer": "demo",
124-
"validIssuer": "demo",
131+
"issuer": "genocs-identity-service",
132+
"validIssuer": "genocs-identity-service",
125133
"validateAudience": false,
126134
"validateIssuer": true,
127135
"validateLifetime": true,
@@ -245,4 +253,4 @@
245253
}
246254
}
247255
}
248-
}
256+
}

src/apps/api-gateway/Genocs.APIGateway/appsettings.Docker.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"url": "http://consul:8500",
55
"service": "api-gateway",
66
"address": "api-gateway",
7-
"port": "5500"
7+
"port": "80"
88
},
99
"fabio": {
1010
"enabled": true,
@@ -29,7 +29,8 @@
2929
"enabled": true,
3030
"influxEnabled": true,
3131
"prometheusEnabled": true,
32-
"influxUrl": "http://influxdb:8086"
32+
"influxUrl": "http://influxdb:8086",
33+
"env": "docker"
3334
},
3435
"prometheus": {
3536
"enabled": true
@@ -52,14 +53,14 @@
5253
"products-cluster": {
5354
"destinations": {
5455
"destination1": {
55-
"address": "http://product-service"
56+
"address": "http://products-service"
5657
}
5758
}
5859
},
5960
"orders-cluster": {
6061
"destinations": {
6162
"destination1": {
62-
"address": "http://order-service"
63+
"address": "http://orders-service"
6364
}
6465
}
6566
},

src/apps/api-gateway/Genocs.APIGateway/appsettings.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,12 @@
2020
"certificate": {
2121
"location": "certs/localhost.cer"
2222
},
23-
"validIssuer": "genocs-identity-service-bla",
24-
"validateAudience": true,
23+
"issuer": "genocs-identity-service",
24+
"validIssuer": "genocs-identity-service",
25+
"validateAudience": false,
2526
"validateIssuer": true,
26-
"validateLifetime": true
27+
"validateLifetime": true,
28+
"expiry": "01:00:00"
2729
},
2830
"logger": {
2931
"level": "information",

src/apps/docker-compose.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ services:
1313
- genocs
1414
# network_mode: bridge
1515
volumes:
16-
- apigateway:/var/lib/data
16+
- apigateway:/root/.aspnet/DataProtection-Keys
1717

1818
identity-service:
1919
image: genocs/identity-webapi:${IMAGE_VERSION}
@@ -27,7 +27,7 @@ services:
2727
- genocs
2828
# network_mode: bridge
2929
volumes:
30-
- identity:/var/lib/data
30+
- identity:/root/.aspnet/DataProtection-Keys
3131

3232
products-service:
3333
image: genocs/product-webapi:${IMAGE_VERSION}
@@ -42,7 +42,7 @@ services:
4242
- genocs
4343
# network_mode: bridge
4444
volumes:
45-
- products:/var/lib/data
45+
- products:/root/.aspnet/DataProtection-Keys
4646

4747
orders-service:
4848
image: genocs/order-webapi:${IMAGE_VERSION}
@@ -57,7 +57,7 @@ services:
5757
- genocs
5858
# network_mode: bridge
5959
volumes:
60-
- orders:/var/lib/data
60+
- orders:/root/.aspnet/DataProtection-Keys
6161

6262
signalr-service:
6363
image: genocs/signalr-webapi:${IMAGE_VERSION}
@@ -72,7 +72,8 @@ services:
7272
- genocs
7373
# network_mode: bridge
7474
volumes:
75-
- signalr:/var/lib/data
75+
- signalr:/root/.aspnet/DataProtection-Keys
76+
7677
networks:
7778
genocs:
7879
name: genocs-network

src/apps/identity/Genocs.Identities.WebApi/appsettings.Docker.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
{
22
"consul": {
33
"enabled": true,
4-
"url": "http://consul:8500"
4+
"url": "http://consul:8500",
5+
"service": "identity-service",
6+
"address": "identity-service",
7+
"port": "80"
58
},
69
"fabio": {
710
"enabled": true,
8-
"url": "http://fabio:9999"
11+
"url": "http://localhost:9999",
12+
"service": "identity-service"
913
},
1014
"logger": {
1115
"seq": {
@@ -25,7 +29,8 @@
2529
"enabled": true,
2630
"influxEnabled": true,
2731
"prometheusEnabled": true,
28-
"influxUrl": "http://influxdb:8086"
32+
"influxUrl": "http://influxdb:8086",
33+
"env": "docker"
2934
},
3035
"prometheus": {
3136
"enabled": true

src/apps/orders/Genocs.Orders.WebApi/appsettings.Docker.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"url": "http://consul:8500",
55
"service": "orders-service",
66
"address": "orders-service",
7-
"port": "5503"
7+
"port": "80"
88
},
99
"fabio": {
1010
"enabled": true,
@@ -29,7 +29,8 @@
2929
"enabled": true,
3030
"influxEnabled": true,
3131
"prometheusEnabled": true,
32-
"influxUrl": "http://influxdb:8086"
32+
"influxUrl": "http://influxdb:8086",
33+
"env": "docker"
3334
},
3435
"prometheus": {
3536
"enabled": true

0 commit comments

Comments
 (0)