Use Gitea deploy workflow for questions API
This commit is contained in:
@@ -11,9 +11,9 @@ FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS final
|
||||
WORKDIR /app
|
||||
COPY --from=build /app/publish .
|
||||
|
||||
ENV ASPNETCORE_URLS=http://+:8080 \
|
||||
ENV ASPNETCORE_URLS=http://+:5008 \
|
||||
ASPNETCORE_ENVIRONMENT=Production
|
||||
|
||||
EXPOSE 8080
|
||||
EXPOSE 5008
|
||||
|
||||
ENTRYPOINT ["dotnet", "QuestionsApi.dll"]
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: step3-questions
|
||||
labels:
|
||||
app: step3-questions
|
||||
spec:
|
||||
replicas: 2
|
||||
selector:
|
||||
matchLabels:
|
||||
app: step3-questions
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: step3-questions
|
||||
spec:
|
||||
containers:
|
||||
- name: step3-questions
|
||||
image: step3-questions:latest
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- containerPort: 5008
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: 5008
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
@@ -0,0 +1,15 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: step3-questions
|
||||
labels:
|
||||
app: step3-questions
|
||||
spec:
|
||||
selector:
|
||||
app: step3-questions
|
||||
type: NodePort
|
||||
ports:
|
||||
- name: http
|
||||
port: 80
|
||||
targetPort: 5008
|
||||
nodePort: 30088
|
||||
Reference in New Issue
Block a user