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
-3
View File
@@ -2,9 +2,6 @@ node_modules
dist dist
.git .git
*.log *.log
apps/web/dist
apps/server/dist
apps/server/uploads
.vscode .vscode
.env .env
bin/ bin/
+2 -2
View File
@@ -3,10 +3,10 @@ WORKDIR /app
# Copy everything and restore as distinct layers # Copy everything and restore as distinct layers
COPY . . COPY . .
RUN dotnet restore apps/server-net/Knot.sln RUN dotnet restore Knot.sln
# Build and publish a release # 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 # Build runtime image
FROM mcr.microsoft.com/dotnet/aspnet:10.0-preview FROM mcr.microsoft.com/dotnet/aspnet:10.0-preview
+3 -3
View File
@@ -3,15 +3,15 @@ FROM node:20-alpine AS build
WORKDIR /app WORKDIR /app
# Copy package files for apps/web # Copy package files
# We use the local package files to avoid workspace hoisting issues in Docker # 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) # 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 # Let's try to generate a clean install
RUN npm install --legacy-peer-deps RUN npm install --legacy-peer-deps
# Copy source code # Copy source code
COPY apps/web/ ./ COPY . ./
# Build web frontend # Build web frontend
RUN npm run build RUN npm run build
+4 -4
View File
@@ -12,8 +12,8 @@ services:
server: server:
build: build:
context: . context: ../backend
dockerfile: Dockerfile.server-net dockerfile: Dockerfile
container_name: knot-server container_name: knot-server
restart: always restart: always
env_file: env_file:
@@ -48,8 +48,8 @@ services:
web: web:
build: build:
context: . context: ../client-web
dockerfile: Dockerfile.web dockerfile: Dockerfile
container_name: knot-web container_name: knot-web
restart: always restart: always
ports: ports: