prueba tecnica

This commit is contained in:
Alejandro
2025-06-15 18:29:25 +02:00
parent 9758ee0bc6
commit d97e55a83f
127 changed files with 6488 additions and 1 deletions

12
docker/Caddyfile Normal file
View File

@@ -0,0 +1,12 @@
:80
root * /usr/share/caddy
file_server
handle /api/* {
reverse_proxy backend:8080
}
handle {
try_files {path} /index.html
}

13
docker/backend.Dockerfile Normal file
View File

@@ -0,0 +1,13 @@
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
WORKDIR /src
COPY backend/ProximaContracts/ ./
RUN dotnet restore
WORKDIR /src/ProximaContracts.API
RUN dotnet publish -c Release -o /app/publish
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS final
ENV ASPNETCORE_URLS=http://+:8080
WORKDIR /app
COPY --from=build /app/publish .
EXPOSE 8080
ENTRYPOINT ["dotnet","ProximaContracts.API.dll"]

View File

@@ -0,0 +1,13 @@
# ---------- build ----------
FROM node:20-alpine AS build
WORKDIR /app
COPY front/contracts-frontend/package*.json ./
RUN npm ci
COPY front/contracts-frontend .
RUN npm run build
# ---------- runtime ----------
FROM caddy:2-alpine
COPY --from=build /app/dist /usr/share/caddy
COPY docker/Caddyfile /etc/caddy/Caddyfile
EXPOSE 80