Browse Source

update for dev

pull/38/head
yusuf karatoprak 6 years ago
parent
commit
a8fe049da9
  1. 19
      Dockerfile
  2. 16
      azure-pipelines.yml
  3. 5
      etc/docker/docker-compose.infrastructure.override.yml
  4. 10
      etc/docker/docker-compose.infrastructure.yml
  5. 19
      manifests/deployment.yml
  6. 10
      manifests/service.yml
  7. 2
      src/EventHub.BackgroundServices/appsettings.json
  8. 2
      src/EventHub.DbMigrator/appsettings.json
  9. 2
      src/EventHub.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/EventHubMigrationsDbContextFactory.cs
  10. 2633
      src/EventHub.EntityFrameworkCore.DbMigrations/Migrations/20210307195605_Initial.Designer.cs
  11. 31
      src/EventHub.EntityFrameworkCore.DbMigrations/Migrations/20210321144318_Added_Indexes.cs
  12. 5273
      src/EventHub.EntityFrameworkCore.DbMigrations/Migrations/20210421100913_Initial.Designer.cs
  13. 3149
      src/EventHub.EntityFrameworkCore.DbMigrations/Migrations/20210421100913_Initial.cs
  14. 863
      src/EventHub.EntityFrameworkCore.DbMigrations/Migrations/EventHubMigrationsDbContextModelSnapshot.cs
  15. 6
      src/EventHub.EntityFrameworkCore/EntityFrameworkCore/EventHubEntityFrameworkCoreModule.cs
  16. 2
      src/EventHub.EntityFrameworkCore/EventHub.EntityFrameworkCore.csproj
  17. 15
      src/EventHub.HttpApi.Host/.dockerignore copy
  18. 2
      src/EventHub.HttpApi.Host/appsettings.json
  19. 2
      src/EventHub.IdentityServer/appsettings.json

19
Dockerfile

@ -0,0 +1,19 @@
FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS base
WORKDIR /app
EXPOSE 80
FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
WORKDIR /src
COPY ["src/EventHub.Web/EventHub.Web.csproj", "src/EventHub.Web/"]
RUN dotnet restore "src/EventHub.Web/EventHub.Web.csproj"
COPY . .
WORKDIR "/src/src/EventHub.Web"
RUN dotnet build "EventHub.Web.csproj" -c Release -o /app
FROM build AS publish
RUN dotnet publish "EventHub.Web.csproj" -c Release -o /app
FROM base AS final
WORKDIR /app
COPY --from=publish /app .
ENTRYPOINT ["dotnet", "EventHub.Web.dll"]

16
azure-pipelines.yml

@ -3,20 +3,26 @@
# https://docs.microsoft.com/azure/devops/pipelines/languages/docker
trigger:
- dev
- main
variables:
# Container registry service connection established during pipeline creation
dockerRegistryServiceConnection: '0648130a-0d3e-41f3-b92e-fc7f620264e8'
imageRepository: 'voloeventhub'
dockerRegistryServiceConnection: '9a6341b6-70a5-4ee7-b7a2-5efa6d4f0fe3'
imageRepository: 'volosofteventhub'
containerRegistry: 'voloeventhub.azurecr.io'
dockerfilePath: '**/Dockerfile'
tag: '$(Build.BuildNumber)'
<<<<<<< HEAD
=======
>>>>>>> main
# Agent VM image name
vmImageName: 'ubuntu-latest'
stages:
- stage: Build
displayName: Build stage
@ -48,11 +54,13 @@ stages:
displayName: Deploy
pool:
vmImage: $(vmImageName)
environment: 'volosofteventhub.default'
environment: 'volosofteventhub-5982.default'
strategy:
runOnce:
deploy:
steps:
- task: KubernetesManifest@0
displayName: Deploy to Kubernetes cluster
inputs:

5
etc/docker/docker-compose.infrastructure.override.yml

@ -3,4 +3,7 @@ version: '3.7'
services:
redis:
ports:
- "6379:6379"
- "6379:6379"
postgresql:
ports:
- "5432:5432"

10
etc/docker/docker-compose.infrastructure.yml

@ -5,7 +5,15 @@ services:
image: redis:6.0.10-alpine
networks:
- eventhub-network
postgresql:
image: postgres
restart: always
environment:
POSTGRES_USER: "root"
POSTGRES_PASSWORD: "root"
networks:
- eventhub-network
networks:
eventhub-network:
external: true

19
manifests/deployment.yml

@ -0,0 +1,19 @@
apiVersion : apps/v1
kind: Deployment
metadata:
name: voloeventhub
spec:
replicas: 1
selector:
matchLabels:
app: voloeventhub
template:
metadata:
labels:
app: voloeventhub
spec:
containers:
- name: voloeventhub
image: voloeventhub.azurecr.io/voloeventhub
ports:
- containerPort: 80

10
manifests/service.yml

@ -0,0 +1,10 @@
apiVersion: v1
kind: Service
metadata:
name: voloeventhub
spec:
type: LoadBalancer
ports:
- port: 80
selector:
app: voloeventhub

2
src/EventHub.BackgroundServices/appsettings.json

@ -1,6 +1,8 @@
{
"ConnectionStrings": {
"Default": "Server=tcp:volosofteventhub.database.windows.net,1433;Initial Catalog=volosofteventhub;Persist Security Info=False;User ID=volosoft;Password=@Palandoken2021;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;"
},
"Redis": {
"Configuration": "Server=tcp:volosofteventhub.database.windows.net,1433;Initial Catalog=volosofteventhub;Persist Security Info=False;User ID=volosoft;Password=@Palandoken2021;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;"

2
src/EventHub.DbMigrator/appsettings.json

@ -1,6 +1,8 @@
{
"ConnectionStrings": {
"Default": "Server=tcp:volosofteventhub.database.windows.net,1433;Initial Catalog=volosofteventhub;Persist Security Info=False;User ID=volosoft;Password=@Palandoken2021;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;"
},
"IdentityServer": {
"Clients": {

2
src/EventHub.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/EventHubMigrationsDbContextFactory.cs

@ -16,7 +16,7 @@ namespace EventHub.EntityFrameworkCore
var configuration = BuildConfiguration();
var builder = new DbContextOptionsBuilder<EventHubMigrationsDbContext>()
.UseSqlServer(configuration.GetConnectionString("Default"));
.UseNpgsql(configuration.GetConnectionString("Default"));
return new EventHubMigrationsDbContext(builder.Options);
}

2633
src/EventHub.EntityFrameworkCore.DbMigrations/Migrations/20210307195605_Initial.Designer.cs

File diff suppressed because it is too large

31
src/EventHub.EntityFrameworkCore.DbMigrations/Migrations/20210321144318_Added_Indexes.cs

@ -1,31 +0,0 @@
using Microsoft.EntityFrameworkCore.Migrations;
namespace EventHub.Migrations
{
public partial class Added_Indexes : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateIndex(
name: "IX_EhEvents_IsEmailSentToMembers",
table: "EhEvents",
column: "IsEmailSentToMembers");
migrationBuilder.CreateIndex(
name: "IX_EhEvents_IsRemindingEmailSent_StartTime",
table: "EhEvents",
columns: new[] { "IsRemindingEmailSent", "StartTime" });
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropIndex(
name: "IX_EhEvents_IsEmailSentToMembers",
table: "EhEvents");
migrationBuilder.DropIndex(
name: "IX_EhEvents_IsRemindingEmailSent_StartTime",
table: "EhEvents");
}
}
}

5273
src/EventHub.EntityFrameworkCore.DbMigrations/Migrations/20210321144318_Added_Indexes.Designer.cs → src/EventHub.EntityFrameworkCore.DbMigrations/Migrations/20210421100913_Initial.Designer.cs

File diff suppressed because it is too large

3149
src/EventHub.EntityFrameworkCore.DbMigrations/Migrations/20210307195605_Initial.cs → src/EventHub.EntityFrameworkCore.DbMigrations/Migrations/20210421100913_Initial.cs

File diff suppressed because it is too large

863
src/EventHub.EntityFrameworkCore.DbMigrations/Migrations/EventHubMigrationsDbContextModelSnapshot.cs

File diff suppressed because it is too large

6
src/EventHub.EntityFrameworkCore/EntityFrameworkCore/EventHubEntityFrameworkCoreModule.cs

@ -2,13 +2,13 @@ using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.AuditLogging.EntityFrameworkCore;
using Volo.Abp.BackgroundJobs.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore.SqlServer;
using Volo.Abp.Identity.EntityFrameworkCore;
using Volo.Abp.IdentityServer.EntityFrameworkCore;
using Volo.Abp.Modularity;
using Volo.Abp.PermissionManagement.EntityFrameworkCore;
using Volo.Abp.SettingManagement.EntityFrameworkCore;
using Volo.Abp.BlobStoring.Database.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore.PostgreSql;
namespace EventHub.EntityFrameworkCore
{
@ -18,7 +18,7 @@ namespace EventHub.EntityFrameworkCore
typeof(AbpIdentityServerEntityFrameworkCoreModule),
typeof(AbpPermissionManagementEntityFrameworkCoreModule),
typeof(AbpSettingManagementEntityFrameworkCoreModule),
typeof(AbpEntityFrameworkCoreSqlServerModule),
typeof(AbpEntityFrameworkCorePostgreSqlModule),
typeof(AbpBackgroundJobsEntityFrameworkCoreModule),
typeof(AbpAuditLoggingEntityFrameworkCoreModule),
typeof(BlobStoringDatabaseEntityFrameworkCoreModule)
@ -43,7 +43,7 @@ namespace EventHub.EntityFrameworkCore
{
/* The main point to change your DBMS.
* See also EventHubMigrationsDbContextFactory for EF Core tooling. */
options.UseSqlServer();
options.UseNpgsql();
});
}
}

2
src/EventHub.EntityFrameworkCore/EventHub.EntityFrameworkCore.csproj

@ -10,7 +10,7 @@
<ItemGroup>
<PackageReference Include="Volo.Abp.BlobStoring.Database.EntityFrameworkCore" Version="4.2.1" />
<ProjectReference Include="..\EventHub.Domain\EventHub.Domain.csproj" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore.SqlServer" Version="4.2.1" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore.PostgreSql" Version="4.2.1" />
<PackageReference Include="Volo.Abp.PermissionManagement.EntityFrameworkCore" Version="4.2.1" />
<PackageReference Include="Volo.Abp.SettingManagement.EntityFrameworkCore" Version="4.2.1" />
<PackageReference Include="Volo.Abp.Identity.EntityFrameworkCore" Version="4.2.1" />

15
src/EventHub.HttpApi.Host/.dockerignore copy

@ -0,0 +1,15 @@
node_modules
npm-debug.log
Dockerfile*
docker-compose*
.dockerignore
.git
.gitignore
.env
*/bin
*/obj
bin
obj
README.md
LICENSE
.vscode

2
src/EventHub.HttpApi.Host/appsettings.json

@ -3,7 +3,9 @@
"CorsOrigins": "https://*.EventHub.com,https://localhost:44307,https://localhost:44308"
},
"ConnectionStrings": {
"Default": "Server=tcp:volosofteventhub.database.windows.net,1433;Initial Catalog=volosofteventhub;Persist Security Info=False;User ID=volosoft;Password=@Palandoken2021;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;"
},
"Redis": {
"Configuration": "volosofteventhub.redis.cache.windows.net:6380,password=9Kc6E1lbwy5c+RHR1KZS26JPydYR5SeR8UixdECQWv4=,ssl=True,abortConnect=False"

2
src/EventHub.IdentityServer/appsettings.json

@ -5,7 +5,9 @@
"RedirectAllowedUrls": "http://localhost:4200,https://localhost:44307"
},
"ConnectionStrings": {
"Default": "Server=tcp:volosofteventhub.database.windows.net,1433;Initial Catalog=volosofteventhub;Persist Security Info=False;User ID=volosoft;Password=@Palandoken2021;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;"
},
"Redis": {
"Configuration": "volosofteventhub.redis.cache.windows.net:6380,password=9Kc6E1lbwy5c+RHR1KZS26JPydYR5SeR8UixdECQWv4=,ssl=True,abortConnect=False"

Loading…
Cancel
Save