Adjust ports in service and ingress

main
ilitirit 3 years ago
parent 30d538f06e
commit 6f9a5345a3

@ -34,7 +34,8 @@ COPY --from=build /app/publish .
ENV ASPNETCORE_ENVIRONMENT=Production ENV ASPNETCORE_ENVIRONMENT=Production
# Expose the port the application will run on # Expose the port the application will run on
EXPOSE 7033 EXPOSE 80
EXPOSE 443
# Set the entry point for the container # Set the entry point for the container
ENTRYPOINT ["dotnet", "Expedience.Api.dll"] ENTRYPOINT ["dotnet", "Expedience.Api.dll"]

@ -53,6 +53,8 @@ if (app.Environment.IsDevelopment())
app.UseSwaggerUI(); app.UseSwaggerUI();
} }
app.UseHttpsRedirection();
app.UseAuthorization(); app.UseAuthorization();
app.MapControllers(); app.MapControllers();

@ -6,6 +6,7 @@ metadata:
annotations: annotations:
kubernetes.io/ingress.class: "nginx" kubernetes.io/ingress.class: "nginx"
cert-manager.io/cluster-issuer: letsencrypt-prod cert-manager.io/cluster-issuer: letsencrypt-prod
nginx.ingress.kubernetes.io/proxy-redirect-from-ssl: "true"
spec: spec:
tls: tls:
- hosts: - hosts:
@ -20,4 +21,4 @@ spec:
service: service:
name: expedience-api-service name: expedience-api-service
port: port:
number: 7033 number: 80

@ -8,6 +8,6 @@ spec:
app: expedience-api app: expedience-api
ports: ports:
- protocol: TCP - protocol: TCP
port: 7033 port: 80
targetPort: 80 targetPort: 80
type: ClusterIP type: ClusterIP

Loading…
Cancel
Save