fix: use standard dist/ output for Vite, copy to static/ explicitly
The relative outDir '../src/main/resources/static' resolved unpredictably in Docker. Use standard 'dist/' output, then: - Dockerfile: COPY --from=frontend /ui/dist/ to static/ - CI: cp -r dist/ to src/main/resources/static/ Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -33,6 +33,7 @@ jobs:
|
|||||||
echo "//gitea.siegeln.net/api/packages/cameleer/npm/:_authToken=${REGISTRY_TOKEN}" >> .npmrc
|
echo "//gitea.siegeln.net/api/packages/cameleer/npm/:_authToken=${REGISTRY_TOKEN}" >> .npmrc
|
||||||
npm ci
|
npm ci
|
||||||
npm run build
|
npm run build
|
||||||
|
cp -r dist/ ../src/main/resources/static/
|
||||||
env:
|
env:
|
||||||
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
|
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ COPY mvnw pom.xml ./
|
|||||||
# Cache deps — only re-downloaded when POM changes
|
# Cache deps — only re-downloaded when POM changes
|
||||||
RUN ./mvnw dependency:go-offline -B || true
|
RUN ./mvnw dependency:go-offline -B || true
|
||||||
COPY src/ src/
|
COPY src/ src/
|
||||||
COPY --from=frontend /src/main/resources/static/ src/main/resources/static/
|
COPY --from=frontend /ui/dist/ src/main/resources/static/
|
||||||
RUN ./mvnw package -DskipTests -B
|
RUN ./mvnw package -DskipTests -B
|
||||||
|
|
||||||
# Runtime: target platform (amd64)
|
# Runtime: target platform (amd64)
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export default defineConfig({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
build: {
|
build: {
|
||||||
outDir: '../src/main/resources/static',
|
outDir: 'dist',
|
||||||
emptyOutDir: true,
|
emptyOutDir: true,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user