Update Dockerfiles and compose paths for new flat structure

This commit is contained in:
Халимов Рустам
2026-03-19 22:34:49 +03:00
parent 77912f2d88
commit 17d02beb30
4 changed files with 9 additions and 12 deletions

View File

@@ -2,9 +2,6 @@ node_modules
dist
.git
*.log
apps/web/dist
apps/server/dist
apps/server/uploads
.vscode
.env
bin/

View File

@@ -3,10 +3,10 @@ WORKDIR /app
# Copy everything and restore as distinct layers
COPY . .
RUN dotnet restore apps/server-net/Knot.sln
RUN dotnet restore Knot.sln
# Build and publish a release
RUN dotnet publish apps/server-net/src/Host/Host.csproj -c Release -o out
RUN dotnet publish src/Host/Host.csproj -c Release -o out
# Build runtime image
FROM mcr.microsoft.com/dotnet/aspnet:10.0-preview

View File

@@ -3,15 +3,15 @@ FROM node:20-alpine AS build
WORKDIR /app
# Copy package files for apps/web
# Copy package files
# We use the local package files to avoid workspace hoisting issues in Docker
COPY apps/web/package.json ./
COPY package.json ./
# If there is a lockfile in apps/web, use it, otherwise use root (but root is workspace, so better not)
# Let's try to generate a clean install
RUN npm install --legacy-peer-deps
# Copy source code
COPY apps/web/ ./
COPY . ./
# Build web frontend
RUN npm run build

View File

@@ -12,8 +12,8 @@ services:
server:
build:
context: .
dockerfile: Dockerfile.server-net
context: ../backend
dockerfile: Dockerfile
container_name: knot-server
restart: always
env_file:
@@ -48,8 +48,8 @@ services:
web:
build:
context: .
dockerfile: Dockerfile.web
context: ../client-web
dockerfile: Dockerfile
container_name: knot-web
restart: always
ports: