-
Notifications
You must be signed in to change notification settings - Fork 582
How to Run
Phong Nguyen edited this page Jan 24, 2020
·
4 revisions
- Update Connection Strings:
Project | Configuration File | Configuration Key |
---|---|---|
ClassifiedAds.Migrator | appsettings.json | ConnectionStrings:ClassifiedAds |
ClassifiedAds.BackgroundServices | appsettings.json | ConnectionStrings:ClassifiedAds |
ClassifiedAds.GRPC | appsettings.json | ConnectionStrings:ClassifiedAds |
ClassifiedAds.IdentityServer | appsettings.json | ConnectionStrings:ClassifiedAds |
ClassifiedAds.NotificationServer | appsettings.json | |
ClassifiedAds.WebAPI | appsettings.json | ConnectionStrings:ClassifiedAds |
ClassifiedAds.WebMVC | appsettings.json | ConnectionStrings:ClassifiedAds |
ClassifiedAds.GraphQL | appsettings.json | ConnectionStrings:ClassifiedAds |
ClassifiedAds.Ocelot | appsettings.json |
- Install dotnet-ef cli:
dotnet tool install --global dotnet-ef --version="3.1"
- Navigate to ClassifiedAds.Migrator and run these commands:
dotnet ef migrations add Init --context AdsDbContext
dotnet ef database update --context AdsDbContext
dotnet ef database update --context ConfigurationDbContext
dotnet ef database update --context PersistedGrantDbContext
- Open ClassifiedAds.WebMVC/appsettings.json and jump to Storage section.
"Storage": {
"Provider": "Local",
},
- Use Local Files:
"Storage": {
"Provider": "Local",
"Local": {
"Path": "E:\\files"
},
},
- Use Azure Blob:
"Storage": {
"Provider": "Azure",
"Azure": {
"ConnectionString": "xxx",
"Container": "classifiedadds"
},
},
- Use Amazon S3:
"Storage": {
"Provider": "Amazon",
"Amazon": {
"AccessKeyID": "xxx",
"SecretAccessKey": "xxx",
"BucketName": "classifiedadds",
"RegionEndpoint": "ap-southeast-1"
}
},
- Open ClassifiedAds.WebMVC/appsettings.json and jump to MessageBroker section.
"MessageBroker": {
"Provider": "RabbitMQ",
}
- Use RabbitMQ
"MessageBroker": {
"Provider": "RabbitMQ",
"RabbitMQ": {
"HostName": "localhost",
"UserName": "guest",
"Password": "guest",
"ExchangeName": "amq.direct",
"RoutingKey_FileUploaded": "classifiedadds_fileuploaded",
"RoutingKey_FileDeleted": "classifiedadds_filedeleted"
},
}
- Use Kafka:
"MessageBroker": {
"Provider": "Kafka",
"Kafka": {
"BootstrapServers": "localhost:9092",
"Topic_FileUploaded": "classifiedadds_fileuploaded",
"Topic_FileDeleted": "classifiedadds_filedeleted"
},
}
- Use Azure Queue Storage:
"MessageBroker": {
"Provider": "AzureQueue",
"AzureQueue": {
"ConnectionString": "xxx",
"QueueName_FileUploaded": "classifiedadds-fileuploaded",
"QueueName_FileDeleted": "classifiedadds-filedeleted"
},
}
- Use Azure Service Bus:
"MessageBroker": {
"Provider": "AzureServiceBus",
"AzureServiceBus": {
"ConnectionString": "xxx",
"QueueName_FileUploaded": "classifiedadds_fileuploaded",
"QueueName_FileDeleted": "classifiedadds_filedeleted"
}
}