Skip to content

Commit

Permalink
#110: addin production environment to apigateway
Browse files Browse the repository at this point in the history
  • Loading branch information
SaintAngeLs committed Jan 14, 2024
1 parent 2d75f94 commit 8788b3d
Show file tree
Hide file tree
Showing 5 changed files with 231 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"logger": {
"excludePaths": ["/", "/ping", "/metrics"],
"console": {
"enabled": true
},
"file": {
"enabled": true,
"path": "logs/logs.txt",
"interval": "day"
},
"seq": {
"enabled": true,
"url": "http://seq:5341",
"apiKey": "secret"
}
},
"metrics": {
"enabled": true,
"influxEnabled": false,
"prometheusEnabled": true,
"influxUrl": "http://influx:8086",
"database": "swiftparcel",
"env": "local",
"interval": 5
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,22 @@
},
"consul": {
"enabled": true,
"url": "http://consul:8500",
"url": "http://localhost:8500",
"service": "lecturer-api-service",
"address": "lecturer-api-service",
"port": "80",
"address": "docker.for.win.localhost",
"port": "5013",
"pingEnabled": true,
"pingEndpoint": "ping",
"pingInterval": 3,
"removeAfterInterval": 3
},
"fabio": {
"enabled": false,
"url": "http://fabio:9999",
"url": "http://localhost:9999",
"service": "lecturer-api-service"
},
"httpClient": {
"type": "direct",
"type": "",
"retries": 3,
"services": {
"lecturer-api": "https://mini.currier.api.snet.com.pl",
Expand Down Expand Up @@ -57,7 +57,7 @@
"mongo": {
"type": "database",
"roleName": "lecturer-api-service",
"enabled": false,
"enabled": true,
"autoRenewal": true,
"templates": {
"connectionString": "mongodb+srv://andrii-courier-db-user:piotr-amadeusz-andrii-2023@cluster0.br51nsv.mongodb.net/?retryWrites=true&w=majority"
Expand Down Expand Up @@ -129,7 +129,7 @@
"virtualHost": "/",
"port": 5672,
"hostnames": [
"rabbitmq"
"localhost"
],
"requestedConnectionTimeout": "00:00:30",
"requestedHeartbeat": "00:01:00",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
{
"app": {
"name": "SwiftParcel Lecturer API Service",
"service": "lecturer-api-service",
"version": "1"
},
"consul": {
"enabled": true,
"url": "http://consul:8500",
"service": "lecturer-api-service",
"address": "lecturer-api-service",
"port": "80",
"pingEnabled": true,
"pingEndpoint": "ping",
"pingInterval": 3,
"removeAfterInterval": 3
},
"fabio": {
"enabled": false,
"url": "http://fabio:9999",
"service": "lecturer-api-service"
},
"httpClient": {
"type": "direct",
"retries": 3,
"services": {
"lecturer-api": "https://mini.currier.api.snet.com.pl",
"lecturer-api-identity": "https://indentitymanager.snet.com.pl/connect/token"
},
"token": "dGVhbTJkOkVBQUE1MEI4LTkwQ0ItNDM2RS05ODY0LTRCQzc1QjU2RjNCRQ==",
"requestMasking": {
"enabled": true,
"maskTemplate": "*****"
}
},
"AllowedHosts": "*",
"vault": {
"enabled": false,
"url": "http://127.0.0.1:8200",
"authType": "userpass",
"token": "secret",
"username": "user",
"password": "piotr-amadeusz-andrii-2023",
"dbusername": "andrii-courier-db-user",
"kv": {
"enabled": true,
"engineVersion": 2,
"mountPoint": "secret",
"path": "lecturer-api-service/settings"
},
"pki": {
"enabled": false,
"roleName": "lecturer-api-service",
"commonName": "lecturer-api-service.swiftparcel.com"
},
"lease": {
"mongo": {
"type": "database",
"roleName": "lecturer-api-service",
"enabled": false,
"autoRenewal": true,
"templates": {
"connectionString": "mongodb+srv://andrii-courier-db-user:piotr-amadeusz-andrii-2023@cluster0.br51nsv.mongodb.net/?retryWrites=true&w=majority"
}
}
}
},
"logger": {
"level": "information",
"excludePaths": ["/", "/ping", "/metrics"],
"excludeProperties": [
"api_key",
"access_key",
"ApiKey",
"ApiSecret",
"ClientId",
"ClientSecret",
"ConnectionString",
"Password",
"Email",
"Login",
"Secret",
"Token"
],
"console": {
"enabled": true
},
"elk": {
"enabled": false,
"url": "http://localhost:9200"
},
"file": {
"enabled": true,
"path": "logs/logs.txt",
"interval": "day"
},
"seq": {
"enabled": true,
"url": "http://localhost:5341",
"apiKey": "secret"
},
"tags": {}
},
"swagger": {
"enabled": true,
"reDocEnabled": false,
"name": "v1",
"title": "API",
"version": "v1",
"routePrefix": "docs",
"includeSecurity": true
},

"mongo": {
"connectionString": "mongodb+srv://andrii-courier-db-user:piotr-amadeusz-andrii-2023@cluster0.br51nsv.mongodb.net/?retryWrites=true&w=majority",
"database": "lecturer-api-service",
"seed": false
},
"rabbitMq": {
"connectionName": "lecturer-api-service",
"retries": 3,
"retryInterval": 2,
"conventionsCasing": "snakeCase",
"logger": {
"enabled": true
},
"username": "guest",
"password": "guest",
"virtualHost": "/",
"port": 5672,
"hostnames": [
"rabbitmq"
],
"requestedConnectionTimeout": "00:00:30",
"requestedHeartbeat": "00:01:00",
"socketReadTimeout": "00:00:30",
"socketWriteTimeout": "00:00:30",
"continuationTimeout": "00:00:20",
"handshakeContinuationTimeout": "00:00:10",
"networkRecoveryInterval": "00:00:05",
"exchange": {
"declare": true,
"durable": true,
"autoDelete": false,
"type": "topic",
"name": "identity"
},
"queue": {
"declare": true,
"durable": true,
"exclusive": false,
"autoDelete": false,
"template": "lecturer-api-service/{{exchange}}.{{message}}"
},
"context": {
"enabled": true,
"header": "message_context"
},
"spanContextHeader": "span_context"
}
}
18 changes: 18 additions & 0 deletions SwiftParcel/d-docker-compose/services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ services:
identity-service:
image: adrianvsaint/swift-parcel-identity-service
container_name: identity-service
environment:
- ASPNETCORE_ENVIRONMENT=Production
restart: unless-stopped
ports:
- 5292:80
Expand All @@ -14,6 +16,8 @@ services:
web:
image: adrianvsaint/swift-parcel-web
container_name: swiftparcel-web
environment:
- ASPNETCORE_ENVIRONMENT=Production
restart: unless-stopped
ports:
- 3001:80
Expand All @@ -23,6 +27,8 @@ services:
deliveries-service:
image: adrianvsaint/swift-parcel-deliveries-service
container_name: deliveries-service
environment:
- ASPNETCORE_ENVIRONMENT=Production
restart: unless-stopped
ports:
- 5003:80
Expand All @@ -32,6 +38,8 @@ services:
parcels-service:
image: adrianvsaint/swift-parcel-parcels-service
container_name: parcels-service
environment:
- ASPNETCORE_ENVIRONMENT=Production
restart: unless-stopped
ports:
- 5007:80
Expand All @@ -41,6 +49,8 @@ services:
pricing-service:
image: adrianvsaint/swift-parcel-pricing-service
container_name: pricing-service
environment:
- ASPNETCORE_ENVIRONMENT=Production
restart: unless-stopped
ports:
- 5008:80
Expand All @@ -50,6 +60,8 @@ services:
customers-service:
image: adrianvsaint/swift-parcel-customers-service
container_name: customers-service
environment:
- ASPNETCORE_ENVIRONMENT=Production
restart: unless-stopped
ports:
- 5002:80
Expand All @@ -59,6 +71,8 @@ services:
orders-service:
image: adrianvsaint/swift-parcel-orders-service
container_name: orders-service
environment:
- ASPNETCORE_ENVIRONMENT=Production
restart: unless-stopped
ports:
- 5006:80
Expand All @@ -68,6 +82,8 @@ services:
lecturer-api-service:
image: adrianvsaint/swift-parcel-external-api-lecturer-service
container_name: lecturer-api-service
environment:
- ASPNETCORE_ENVIRONMENT=Production
restart: unless-stopped
ports:
- 5004:80
Expand All @@ -77,6 +93,8 @@ services:
api-gateway:
image: adrianvsaint/swift-parcel-apigateway-service
container_name: api-gateway
environment:
- ASPNETCORE_ENVIRONMENT=Production
restart: unless-stopped
environment:
- NTRADA_CONFIG=ntrada.yml
Expand Down
18 changes: 18 additions & 0 deletions SwiftParcel/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
identity-service:
image: adrianvsaint/swift-parcel-identity-service
container_name: identity-service
environment:
- ASPNETCORE_ENVIRONMENT=Production
restart: unless-stopped
ports:
- 5292:80
Expand All @@ -14,6 +16,8 @@
web:
image: adrianvsaint/swift-parcel-web
container_name: swiftparcel-web
environment:
- ASPNETCORE_ENVIRONMENT=Production
restart: unless-stopped
ports:
- 3001:80
Expand All @@ -23,6 +27,8 @@
deliveries-service:
image: adrianvsaint/swift-parcel-deliveries-service
container_name: deliveries-service
environment:
- ASPNETCORE_ENVIRONMENT=Production
restart: unless-stopped
ports:
- 5003:80
Expand All @@ -32,6 +38,8 @@
parcels-service:
image: adrianvsaint/swift-parcel-parcels-service
container_name: parcels-service
environment:
- ASPNETCORE_ENVIRONMENT=Production
restart: unless-stopped
ports:
- 5007:80
Expand All @@ -41,6 +49,8 @@
pricing-service:
image: adrianvsaint/swift-parcel-pricing-service
container_name: pricing-service
environment:
- ASPNETCORE_ENVIRONMENT=Production
restart: unless-stopped
ports:
- 5008:80
Expand All @@ -50,6 +60,8 @@
customers-service:
image: adrianvsaint/swift-parcel-customers-service
container_name: customers-service
environment:
- ASPNETCORE_ENVIRONMENT=Production
restart: unless-stopped
ports:
- 5002:80
Expand All @@ -59,6 +71,8 @@
orders-service:
image: adrianvsaint/swift-parcel-orders-service
container_name: orders-service
environment:
- ASPNETCORE_ENVIRONMENT=Production
restart: unless-stopped
ports:
- 5006:80
Expand All @@ -68,6 +82,8 @@
lecturer-api-service:
image: adrianvsaint/swift-parcel-external-api-lecturer-service
container_name: lecturer-api-service
environment:
- ASPNETCORE_ENVIRONMENT=Production
restart: unless-stopped
ports:
- 5004:80
Expand All @@ -77,6 +93,8 @@
api-gateway:
image: adrianvsaint/swift-parcel-apigateway-service
container_name: api-gateway
environment:
- ASPNETCORE_ENVIRONMENT=Production
restart: unless-stopped
environment:
- NTRADA_CONFIG=ntrada.yml
Expand Down

0 comments on commit 8788b3d

Please sign in to comment.