Skip to content
Snippets Groups Projects
Commit 990531ce authored by David Hintermann's avatar David Hintermann
Browse files

Merge branch 'feat-runtime-add-sample-dotenv' into 'master'

docs: add .env sample and doc how to run

See merge request !3
parents 7b77fcfa 618761aa
1 merge request!3docs: add .env sample and doc how to run
...@@ -4,3 +4,5 @@ services: ...@@ -4,3 +4,5 @@ services:
volumes: volumes:
- .:/workdir - .:/workdir
command: sleep infinity command: sleep infinity
environment:
- TOKEN_ABI_LOCATION=../solidity/token.abi.json
API_URL=https://sepolia.infura.io/v3/{yourApiKey}
ACCOUNT_PRIVATE_KEY=
\ No newline at end of file
...@@ -25,6 +25,8 @@ RUN dotnet publish "./Frontend.csproj" -c $BUILD_CONFIGURATION -o /app/publish / ...@@ -25,6 +25,8 @@ RUN dotnet publish "./Frontend.csproj" -c $BUILD_CONFIGURATION -o /app/publish /
# Diese Stufe wird in der Produktion oder bei Ausführung von VS im regulären Modus verwendet (Standard, wenn die Debugkonfiguration nicht verwendet wird). # Diese Stufe wird in der Produktion oder bei Ausführung von VS im regulären Modus verwendet (Standard, wenn die Debugkonfiguration nicht verwendet wird).
FROM base AS final FROM base AS final
ENV TOKEN_ABI_LOCATION="./token.abi.json"
WORKDIR /app WORKDIR /app
COPY solidity/token.abi.json .
COPY --from=publish /app/publish . COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "Frontend.dll"] ENTRYPOINT ["dotnet", "Frontend.dll"]
...@@ -3,7 +3,10 @@ using Frontend.BackgroundServices; ...@@ -3,7 +3,10 @@ using Frontend.BackgroundServices;
using OpenTelemetry.Metrics; using OpenTelemetry.Metrics;
using OpenTelemetry.Resources; using OpenTelemetry.Resources;
var tokenAbi = File.ReadAllText("../solidity/token.abi.json"); // the location differ in dev and releas mode.
var tokenAbiLocation = Environment.GetEnvironmentVariable("TOKEN_ABI_LOCATION")!;
var tokenAbi = File.ReadAllText(tokenAbiLocation)!;
var chainApiUrl = Environment.GetEnvironmentVariable("API_URL")!; var chainApiUrl = Environment.GetEnvironmentVariable("API_URL")!;
var accountPrivateKey = Environment.GetEnvironmentVariable("ACCOUNT_PRIVATE_KEY")!; var accountPrivateKey = Environment.GetEnvironmentVariable("ACCOUNT_PRIVATE_KEY")!;
......
...@@ -3,6 +3,16 @@ ...@@ -3,6 +3,16 @@
# Project Plan: Roesticoin - A Stablecoin on the Ethereum Blockchain # Project Plan: Roesticoin - A Stablecoin on the Ethereum Blockchain
## Getting all running
when switching between Devcontainer and production, rebuild the container, because the base image is different
### For development in Devcontainer
- open in VS Code
- add and modify `.env` file based on `.env.sample`
- reopen in container
### As release in Production
- add and modify `.env` file based on `.env.sample`
- `docker-compose -f docker-compose.yml -f docker-compose.release.yml up --build -d`
## Project Title: ## Project Title:
**Roesticoin: Swiss Franc-Pegged Stablecoin on Ethereum** **Roesticoin: Swiss Franc-Pegged Stablecoin on Ethereum**
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment