some build changes

This commit is contained in:
john 2025-05-18 17:29:18 +02:00
parent 58ec15e94d
commit 8f0cb82cce
2 changed files with 5 additions and 2 deletions

View file

@ -64,10 +64,11 @@ RUN mkdir -p /app/scripts && \
echo '#!/bin/sh\nexec dotnet /app/femto-db/Femto.Database.dll "$@"' > /app/scripts/femto-db && \
chmod +x /app/scripts/femto-db
# (Optional) Add script dir to PATH for easier access
# Optional: add script dir to PATH for easier access
ENV PATH="/app/scripts:${PATH}"
# This envvar is used by Femto.Database up to load the migrations
ENV MIGRATIONS_DIRECTORY='/app/femto-db/Migrations'
# Entrypoint for the API
ENTRYPOINT ["dotnet", "Femto.Api.dll"]

View file

@ -25,6 +25,8 @@ var connectionStringArg = new Argument<string>(
var connectionStringOption = new Option<string?>(
["-c", "--connection-string"],
// we default this to the same variable used by the server application
() => System.Environment.GetEnvironmentVariable("ConnectionStrings__Database") ?? null,
"the connection string to the database"
);