adding new project pipelines
This commit is contained in:
21
Mindforge.API/Dockerfile
Normal file
21
Mindforge.API/Dockerfile
Normal file
@@ -0,0 +1,21 @@
|
||||
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:9.0-alpine AS builder
|
||||
|
||||
ARG TARGETARCH
|
||||
ARG TARGETOS
|
||||
|
||||
WORKDIR /app
|
||||
COPY Mindforge.API.csproj ./
|
||||
RUN dotnet restore -a $TARGETARCH
|
||||
COPY . .
|
||||
RUN dotnet publish -c Release -a $TARGETARCH --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"]
|
||||
51
Mindforge.API/deploy/mindforge-api.yaml
Normal file
51
Mindforge.API/deploy/mindforge-api.yaml
Normal file
@@ -0,0 +1,51 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: mindforge-api
|
||||
namespace: mindforge
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: mindforge-api
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: mindforge-api
|
||||
spec:
|
||||
containers:
|
||||
- name: mindforge-api
|
||||
image: git.ivanch.me/ivanch/mindforge-api:latest
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
env:
|
||||
- name: OPENAI_API_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: mindforge-secrets
|
||||
key: OPENAI_API_KEY
|
||||
- name: GEMINI_API_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: mindforge-secrets
|
||||
key: GEMINI_API_KEY
|
||||
resources:
|
||||
requests:
|
||||
memory: "128Mi"
|
||||
cpu: "250m"
|
||||
limits:
|
||||
memory: "512Mi"
|
||||
cpu: "1"
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: mindforge-api
|
||||
namespace: mindforge
|
||||
spec:
|
||||
selector:
|
||||
app: mindforge-api
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 8080
|
||||
Reference in New Issue
Block a user