Вики для CRM: ASP.NET Core + SQLite/FTS5 + React/TipTap, авторизация через CRM
This commit is contained in:
35
Dockerfile
Normal file
35
Dockerfile
Normal file
@@ -0,0 +1,35 @@
|
||||
# syntax=docker/dockerfile:1.7
|
||||
|
||||
# 1. Фронтенд
|
||||
FROM node:22-alpine AS web
|
||||
WORKDIR /src
|
||||
COPY frontend/package.json frontend/package-lock.json ./
|
||||
RUN npm ci --no-audit --no-fund
|
||||
COPY frontend/ ./
|
||||
RUN npm run build
|
||||
|
||||
# 2. Бэкенд
|
||||
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS api
|
||||
WORKDIR /src
|
||||
COPY backend/Wiki.Api/Wiki.Api.csproj backend/Wiki.Api/
|
||||
RUN dotnet restore backend/Wiki.Api/Wiki.Api.csproj
|
||||
COPY backend/Wiki.Api/ backend/Wiki.Api/
|
||||
RUN dotnet publish backend/Wiki.Api/Wiki.Api.csproj -c Release -o /out --no-restore /p:UseAppHost=false
|
||||
|
||||
# 3. Runtime
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS runtime
|
||||
WORKDIR /app
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends curl \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
COPY --from=api /out ./
|
||||
COPY --from=web /src/dist ./wwwroot
|
||||
# /data — постоянный том Coolify (SQLite + картинки)
|
||||
RUN mkdir -p /data
|
||||
ENV ASPNETCORE_ENVIRONMENT=Production \
|
||||
ASPNETCORE_URLS=http://+:8080 \
|
||||
Storage__DataDir=/data
|
||||
EXPOSE 8080
|
||||
HEALTHCHECK --interval=30s --timeout=5s --start-period=20s --retries=3 \
|
||||
CMD curl -fsS http://127.0.0.1:8080/health || exit 1
|
||||
ENTRYPOINT ["dotnet", "Wiki.Api.dll"]
|
||||
Reference in New Issue
Block a user