Fix stalled npm install on Coolify build
Prefer IPv4 DNS for npm, cache the npm store between builds, log fetch progress, add retries, and drop the unused ESLint toolchain (291 -> 190 packages). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
bcbc293954
commit
25d8cc91f0
4 changed files with 7 additions and 1427 deletions
|
|
@ -1,9 +1,14 @@
|
|||
# Mega Infrastructure website: build the Vite app, serve the static output with nginx.
|
||||
|
||||
FROM node:22.11.0-alpine AS build
|
||||
FROM node:22.14.0-alpine AS build
|
||||
WORKDIR /app
|
||||
# Servers without working IPv6 can stall npm for minutes per request; prefer IPv4.
|
||||
ENV NODE_OPTIONS=--dns-result-order=ipv4first
|
||||
COPY app/package.json app/package-lock.json ./
|
||||
RUN npm ci
|
||||
# Cache mount keeps downloaded packages between deploys; http loglevel shows progress in Coolify.
|
||||
RUN --mount=type=cache,target=/root/.npm \
|
||||
npm ci --no-audit --no-fund --prefer-offline --loglevel=http \
|
||||
--fetch-timeout=60000 --fetch-retries=5
|
||||
COPY app/ ./
|
||||
RUN npm run build
|
||||
|
||||
|
|
|
|||
|
|
@ -1,28 +0,0 @@
|
|||
import js from '@eslint/js'
|
||||
import globals from 'globals'
|
||||
import reactHooks from 'eslint-plugin-react-hooks'
|
||||
import reactRefresh from 'eslint-plugin-react-refresh'
|
||||
import tseslint from 'typescript-eslint'
|
||||
|
||||
export default tseslint.config(
|
||||
{ ignores: ['dist'] },
|
||||
{
|
||||
extends: [js.configs.recommended, ...tseslint.configs.recommended],
|
||||
files: ['**/*.{ts,tsx}'],
|
||||
languageOptions: {
|
||||
ecmaVersion: 2020,
|
||||
globals: globals.browser,
|
||||
},
|
||||
plugins: {
|
||||
'react-hooks': reactHooks,
|
||||
'react-refresh': reactRefresh,
|
||||
},
|
||||
rules: {
|
||||
...reactHooks.configs.recommended.rules,
|
||||
'react-refresh/only-export-components': [
|
||||
'warn',
|
||||
{ allowConstantExport: true },
|
||||
],
|
||||
},
|
||||
},
|
||||
)
|
||||
1390
app/package-lock.json
generated
1390
app/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -6,7 +6,6 @@
|
|||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "tsc -b && vite build",
|
||||
"lint": "eslint .",
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
@ -15,20 +14,14 @@
|
|||
"react-dom": "^19.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^9.25.0",
|
||||
"@types/node": "^22.20.5",
|
||||
"@types/react": "^19.1.2",
|
||||
"@types/react-dom": "^19.1.2",
|
||||
"@vitejs/plugin-react": "^4.4.1",
|
||||
"autoprefixer": "^10.4.20",
|
||||
"eslint": "^9.25.0",
|
||||
"eslint-plugin-react-hooks": "^5.2.0",
|
||||
"eslint-plugin-react-refresh": "^0.4.19",
|
||||
"globals": "^16.0.0",
|
||||
"postcss": "^8.4.49",
|
||||
"tailwindcss": "^3.4.17",
|
||||
"typescript": "~5.8.3",
|
||||
"typescript-eslint": "^8.30.1",
|
||||
"vite": "^6.3.5"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue