diff --git a/etc/k8s/helm-chart/eventhub/charts/dbmigrator/Chart.yaml b/etc/k8s/helm-chart/eventhub/charts/dbmigrator/Chart.yaml new file mode 100644 index 0000000..a20b761 --- /dev/null +++ b/etc/k8s/helm-chart/eventhub/charts/dbmigrator/Chart.yaml @@ -0,0 +1,6 @@ +apiVersion: v2 +name: migrator +appVersion: "1.0" +description: EventHub Migrator Application +version: 1.0.0 +type: application \ No newline at end of file diff --git a/etc/k8s/helm-chart/eventhub/charts/dbmigrator/templates/migrator.yaml b/etc/k8s/helm-chart/eventhub/charts/dbmigrator/templates/migrator.yaml new file mode 100644 index 0000000..18f6233 --- /dev/null +++ b/etc/k8s/helm-chart/eventhub/charts/dbmigrator/templates/migrator.yaml @@ -0,0 +1,14 @@ +apiVersion: batch/v1 +kind: Job +metadata: + name: migrator +spec: + activeDeadlineSeconds: 100 + template: + spec: + containers: + - name: migrator + image: eventhubmigrator + imagePullPolicy: Never + restartPolicy: Never + backoffLimit: 4 \ No newline at end of file diff --git a/src/EventHub.DbMigrator/Dockerfile b/src/EventHub.DbMigrator/Dockerfile new file mode 100644 index 0000000..1c97a60 --- /dev/null +++ b/src/EventHub.DbMigrator/Dockerfile @@ -0,0 +1,4 @@ + FROM mcr.microsoft.com/dotnet/runtime:5.0 + COPY bin/Release/net5.0/ app/ + WORKDIR /app + ENTRYPOINT ["dotnet", "EventHub.DbMigrator.dll"] \ No newline at end of file diff --git a/src/EventHub.DbMigrator/appsettings.json b/src/EventHub.DbMigrator/appsettings.json index 828fd62..c4413fb 100644 --- a/src/EventHub.DbMigrator/appsettings.json +++ b/src/EventHub.DbMigrator/appsettings.json @@ -1,6 +1,6 @@ { "ConnectionStrings": { - "Default": "Host=localhost;Database=EventHub;Username=root;Password=root;Port=5432" + "Default": "Host=postgresql;Port=5435;Database=EventHub;Username=root;Password=root;Port=5432" }, "IdentityServer": { "Clients": {