prueba tecnica
This commit is contained in:
12
docker/Caddyfile
Normal file
12
docker/Caddyfile
Normal 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
13
docker/backend.Dockerfile
Normal 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"]
|
||||
13
docker/frontend.Dockerfile
Normal file
13
docker/frontend.Dockerfile
Normal 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
|
||||
Reference in New Issue
Block a user