diff --git a/.env.sample b/.env.sample index 8d2204fb613ee7523a91b3c9d3b4a6795f66bf42..50a26eb482e506a5c2ce939548d3245ecb31a778 100644 --- a/.env.sample +++ b/.env.sample @@ -4,4 +4,4 @@ POSTGRES_HOST=postgres POSTGRES_PORT=5432 POSTGRES_DB=roesticoin POSTGRES_USER=roesticoin -PROMETHEUS_BASE_URL=http://prometheus:9000 \ No newline at end of file +PROMETHEUS_BASE_URL=http://prometheus:9000 diff --git a/Frontend/Frontend.csproj b/Frontend/Frontend.csproj index d114f3697144818ed000e0681c78000801fd397b..a98f3f86eb5c5807616f8644abdaeeaf24fc50df 100644 --- a/Frontend/Frontend.csproj +++ b/Frontend/Frontend.csproj @@ -1,5 +1,6 @@ <Project Sdk="Microsoft.NET.Sdk.Web"> <ItemGroup> + <PackageReference Include="DotNetEnv" Version="3.1.1" /> <PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.11" /> <PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.21.0" /> <PackageReference Include="Nethereum.Web3" Version="4.26.0" /> diff --git a/Frontend/Program.cs b/Frontend/Program.cs index bf116b62be1d4b785773c4cbd86c146366829a0c..de5357c42fe991b5d0d99588b2c73b3f9b9df5fe 100644 --- a/Frontend/Program.cs +++ b/Frontend/Program.cs @@ -9,12 +9,15 @@ using Frontend.Metrics; using Nethereum.Web3; using Nethereum.Web3.Accounts; using Microsoft.EntityFrameworkCore; +using DotNetEnv; using OpenTelemetry.Metrics; using OpenTelemetry.Resources; using Org.BouncyCastle.Utilities; using System.Numerics; +// ensure the env file is loaded +Env.Load("../.env"); // the location differ in dev and releas mode. var tokenAbiLocation = Environment.GetEnvironmentVariable("TOKEN_ABI_LOCATION")!; var tokenAbi = File.ReadAllText(tokenAbiLocation)!; diff --git a/docker-compose.yml b/docker-compose.yml index 4a1b1aed32366b345367abd015057789e46dc13d..ee7cee240673e732d4facd0cafbfa082b54b7f68 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -34,13 +34,21 @@ services: POSTGRES_PASSWORD: roesticoin volumes: - postgres_data:/var/lib/postgresql/data - + pgadmin: + image: dpage/pgadmin4 + restart: unless-stopped + ports: + - "5050:80" + environment: + PGADMIN_DEFAULT_EMAIL: 'roesti@example.com' + PGADMIN_DEFAULT_PASSWORD: 'TheRoestiCoinsPgAdmin' roesticoin: env_file: - .env ports: - 8080:8080 - + depends_on: + - postgres volumes: prometheus_data: postgres_data: