diff --git a/infrastructure/comp-sync/Dockerfile b/infrastructure/comp-sync/Dockerfile index 827dc80..fc0d974 100644 --- a/infrastructure/comp-sync/Dockerfile +++ b/infrastructure/comp-sync/Dockerfile @@ -4,6 +4,7 @@ WORKDIR /src # Copy project files and restore COPY src/COMP.Data/COMP.Data.csproj src/COMP.Data/ +COPY src/COMP.API/COMP.API.csproj src/COMP.API/ COPY src/COMP.Sync/COMP.Sync.csproj src/COMP.Sync/ RUN dotnet restore "src/COMP.Sync/COMP.Sync.csproj" diff --git a/src/COMP.API/appsettings.json b/src/COMP.API/appsettings.json deleted file mode 100644 index 9b57a59..0000000 --- a/src/COMP.API/appsettings.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft.AspNetCore": "Warning" - } - }, - "ConnectionStrings": { - "DefaultConnection": "Host=localhost;Port=55443;Database=cardano_metadata;Username=postgres;Password=postgres" - }, - "AllowedHosts": "*" -} diff --git a/src/COMP.Sync/COMP.Sync.csproj b/src/COMP.Sync/COMP.Sync.csproj index 0e3c201..0c5a3ce 100644 --- a/src/COMP.Sync/COMP.Sync.csproj +++ b/src/COMP.Sync/COMP.Sync.csproj @@ -12,7 +12,9 @@ - + + contentfiles + diff --git a/src/COMP.Sync/Services/GithubService.cs b/src/COMP.Sync/Services/GithubService.cs index f8f46fc..283daab 100644 --- a/src/COMP.Sync/Services/GithubService.cs +++ b/src/COMP.Sync/Services/GithubService.cs @@ -1,13 +1,13 @@ -using System.Text.Json; using COMP.Data.Models.Github; namespace COMP.Sync.Services; public class GithubService ( - IConfiguration config, - IHttpClientFactory httpClientFactory) + IConfiguration config, + IHttpClientFactory httpClientFactory) { + private readonly string _registryOwner = config["RegistryOwner"] ?? throw new InvalidOperationException("RegistryOwner is not configured."); private readonly string _registryRepo = config["RegistryRepo"] ?? throw new InvalidOperationException("RegistryRepo is not configured."); private readonly HttpClient _httpClient = httpClientFactory.CreateClient("GithubApi"); diff --git a/src/COMP.Sync/Services/MetadataDbService.cs b/src/COMP.Sync/Services/MetadataDbService.cs index b8280d5..855dace 100644 --- a/src/COMP.Sync/Services/MetadataDbService.cs +++ b/src/COMP.Sync/Services/MetadataDbService.cs @@ -1,5 +1,4 @@ using COMP.Data.Models.Entity; -using COMP.Data.Models; using Microsoft.EntityFrameworkCore; using COMP.Data.Models.Github; using COMP.Data.Data; diff --git a/src/COMP.Sync/appsettings.json b/src/COMP.Sync/appsettings.json deleted file mode 100644 index 48946a3..0000000 --- a/src/COMP.Sync/appsettings.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft.AspNetCore": "Warning", - "Microsoft.EntityFrameworkCore": "Warning", - "Comp.Sync.Reducers": "Debug" - } - }, - "AllowedHosts": "*", - "ConnectionStrings": { - "CardanoContext": "Host=localhost;Port=55443;Database=cardano_metadata;Username=postgres;Password=postgres", - "CardanoContextSchema": "public" - }, - "CardanoNodeConnection": { - "ConnectionType": "UnixSocket", - "UnixSocket": { - "Path": "/Users/hermi/.dmtr/tmp/nebulous-magazine-vvzcja/cardanonode-ylu0vs.socket" - }, - "NetworkMagic": 764824073, - "MaxRollbackSlots": 1000, - "RollbackBuffer": 10, - "Slot": 161928693, - "Hash": "db810cb12fb65b953d7fa52f950ec2e63b4404a313ac1822b9e6c87698a43c43" - }, - "Sync": { - "Dashboard": { - "TuiMode": false, - "RefreshInterval": 5000, - "DisplayType": "sync" - } - }, - "GithubPAT": "YOUR_GITHUB_PAT", - "RegistryOwner": "cardano-foundation", - "RegistryRepo": "cardano-token-registry", - "Github": { - "UserAgent": { - "ProductName": "CardanoMetadataService", - "ProductUrl": "(+https://github.com/SAIB-Inc/COMP)" - } - } -} \ No newline at end of file