Update Dockerfiles and compose paths for new flat structure
This commit is contained in:
@@ -2,9 +2,6 @@ node_modules
|
||||
dist
|
||||
.git
|
||||
*.log
|
||||
apps/web/dist
|
||||
apps/server/dist
|
||||
apps/server/uploads
|
||||
.vscode
|
||||
.env
|
||||
bin/
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user