some build changes
This commit is contained in:
parent
58ec15e94d
commit
8f0cb82cce
2 changed files with 5 additions and 2 deletions
|
@ -64,10 +64,11 @@ RUN mkdir -p /app/scripts && \
|
||||||
echo '#!/bin/sh\nexec dotnet /app/femto-db/Femto.Database.dll "$@"' > /app/scripts/femto-db && \
|
echo '#!/bin/sh\nexec dotnet /app/femto-db/Femto.Database.dll "$@"' > /app/scripts/femto-db && \
|
||||||
chmod +x /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}"
|
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 for the API
|
||||||
ENTRYPOINT ["dotnet", "Femto.Api.dll"]
|
ENTRYPOINT ["dotnet", "Femto.Api.dll"]
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,8 @@ var connectionStringArg = new Argument<string>(
|
||||||
|
|
||||||
var connectionStringOption = new Option<string?>(
|
var connectionStringOption = new Option<string?>(
|
||||||
["-c", "--connection-string"],
|
["-c", "--connection-string"],
|
||||||
|
|
||||||
|
// we default this to the same variable used by the server application
|
||||||
() => System.Environment.GetEnvironmentVariable("ConnectionStrings__Database") ?? null,
|
() => System.Environment.GetEnvironmentVariable("ConnectionStrings__Database") ?? null,
|
||||||
"the connection string to the database"
|
"the connection string to the database"
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue