All checks were successful
Mindforge API Build and Deploy / Build Mindforge API Image (push) Successful in 2m12s
Mindforge API Build and Deploy / Deploy Mindforge API (internal) (push) Successful in 8s
Mindforge Web Build and Deploy (internal) / Build Mindforge Web Image (push) Successful in 3m41s
Mindforge Web Build and Deploy (internal) / Deploy Mindforge Web (internal) (push) Successful in 8s
24 lines
709 B
Docker
24 lines
709 B
Docker
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:9.0-alpine AS builder
|
|
|
|
ARG TARGETARCH
|
|
ARG TARGETOS
|
|
|
|
WORKDIR /app
|
|
COPY Mindforge.API.csproj ./
|
|
RUN if [ "$TARGETARCH" = "amd64" ]; then DOTNET_ARCH="x64"; else DOTNET_ARCH="$TARGETARCH"; fi && \
|
|
dotnet restore -a "$DOTNET_ARCH"
|
|
COPY . .
|
|
RUN if [ "$TARGETARCH" = "amd64" ]; then DOTNET_ARCH="x64"; else DOTNET_ARCH="$TARGETARCH"; fi && \
|
|
dotnet publish -c Release -a "$DOTNET_ARCH" --no-restore -o /app/publish
|
|
|
|
FROM mcr.microsoft.com/dotnet/aspnet:9.0-alpine
|
|
WORKDIR /app
|
|
COPY --from=builder /app/publish .
|
|
|
|
ENV ASPNETCORE_URLS=http://+:8080
|
|
ENV OPENAI_API_KEY=""
|
|
ENV GEMINI_API_KEY=""
|
|
|
|
EXPOSE 8080
|
|
ENTRYPOINT ["dotnet", "Mindforge.API.dll"]
|