fix: fixes broken build
This commit is contained in:
5
.github/workflows/deploy.yml
vendored
5
.github/workflows/deploy.yml
vendored
@@ -110,10 +110,7 @@ jobs:
|
||||
REPO=$(echo "${GITHUB_REPOSITORY#*/}" | tr '[:upper:]' '[:lower:]')
|
||||
|
||||
IMAGE_BASE="ghcr.io/${OWNER}/${REPO}"
|
||||
TAG="${{ github.event.inputs.tag || 'latest' }}"
|
||||
|
||||
echo "Deploying image: ${IMAGE_BASE}:${TAG} to Kubernetes Namespace: ${KUBE_NAMESPACE}"
|
||||
kubectl config use-context --current --namespace=${KUBE_NAMESPACE}
|
||||
IMAGE_TAG="${{ github.event.inputs.tag || 'latest' }}"
|
||||
|
||||
# Apply any other configuration changes if needed
|
||||
envsubst < .k8s/config.yml | kubectl apply -f -
|
||||
|
||||
@@ -16,21 +16,12 @@ spec:
|
||||
app: frontend
|
||||
spec:
|
||||
nodeSelector:
|
||||
${WORKER_NODE_LABEL}
|
||||
initContainers:
|
||||
- name: wait-backend-init
|
||||
image: busybox:latest
|
||||
args:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- >
|
||||
set -x;
|
||||
while [ $(curl -sw '%{http_code}' "backend-service:8000/health" -o /dev/null) -ne 200 ]; do
|
||||
sleep 15;
|
||||
done
|
||||
$WORKER_NODE_LABEL
|
||||
imagePullSecrets:
|
||||
- name: ghcr-login-secret
|
||||
containers:
|
||||
- name: frontend
|
||||
image: ${IMAGE_BASE}:${TAG}
|
||||
image: ${IMAGE_BASE}:${IMAGE_TAG}
|
||||
imagePullPolicy: "Always"
|
||||
resources:
|
||||
requests:
|
||||
|
||||
21
Dockerfile
21
Dockerfile
@@ -4,27 +4,26 @@ FROM base AS build
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package*.json ./
|
||||
RUN npm install -g @angular/cli@20.3.8
|
||||
|
||||
RUN npm install
|
||||
COPY package*.json ./
|
||||
RUN npm install --production
|
||||
|
||||
COPY . .
|
||||
RUN npm run build:prod
|
||||
|
||||
|
||||
FROM base AS prod
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN apk add --update gettext python3 py3-pip py3-setuptools make g++ && \
|
||||
rm -rf /var/cache/apk/*
|
||||
|
||||
|
||||
COPY --from=build /app/node_modules ./node_modules
|
||||
COPY . .
|
||||
COPY --from=build /app/dist ./dist
|
||||
COPY --from=build /app/server.js ./
|
||||
COPY --from=build /app/set_env.js ./
|
||||
COPY --from=build /app/package*.json ./
|
||||
|
||||
|
||||
RUN npm install -g @angular/cli@20.3.8
|
||||
|
||||
RUN npm run build:prod
|
||||
|
||||
EXPOSE 5000-7000
|
||||
|
||||
CMD ["npm", "run", "start:prod"]
|
||||
|
||||
64
package-lock.json
generated
64
package-lock.json
generated
@@ -27,6 +27,7 @@
|
||||
"@sinclair/typebox": "^0.32.4",
|
||||
"apexcharts": "^3.45.1",
|
||||
"bootstrap": "^4.6.2",
|
||||
"compression": "^1.8.1",
|
||||
"cookieconsent": "^3.1.1",
|
||||
"cors": "^2.8.5",
|
||||
"dotenv": "^17.2.3",
|
||||
@@ -6741,6 +6742,60 @@
|
||||
"node": ">=4.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/compressible": {
|
||||
"version": "2.0.18",
|
||||
"resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz",
|
||||
"integrity": "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"mime-db": ">= 1.43.0 < 2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/compression": {
|
||||
"version": "1.8.1",
|
||||
"resolved": "https://registry.npmjs.org/compression/-/compression-1.8.1.tgz",
|
||||
"integrity": "sha512-9mAqGPHLakhCLeNyxPkK4xVo746zQ/czLH1Ky+vkitMnWfWZps8r0qXuwhwizagCRttsL4lfG4pIOvaWLpAP0w==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"bytes": "3.1.2",
|
||||
"compressible": "~2.0.18",
|
||||
"debug": "2.6.9",
|
||||
"negotiator": "~0.6.4",
|
||||
"on-headers": "~1.1.0",
|
||||
"safe-buffer": "5.2.1",
|
||||
"vary": "~1.1.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.8.0"
|
||||
}
|
||||
},
|
||||
"node_modules/compression/node_modules/debug": {
|
||||
"version": "2.6.9",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
|
||||
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"ms": "2.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/compression/node_modules/ms": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
||||
"integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/compression/node_modules/negotiator": {
|
||||
"version": "0.6.4",
|
||||
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.4.tgz",
|
||||
"integrity": "sha512-myRT3DiWPHqho5PrJaIRyaMv2kgYf0mUVgBNOYMuCH5Ki1yEiQaf/ZJuQ62nvpc44wL5WDbTX7yGJi1Neevw8w==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/concat-map": {
|
||||
"version": "0.0.1",
|
||||
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
||||
@@ -11287,6 +11342,15 @@
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/on-headers": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.1.0.tgz",
|
||||
"integrity": "sha512-737ZY3yNnXy37FHkQxPzt4UZ2UWPWiCZWLvFZ4fu5cueciegX0zGPnrlY6bwRg4FdQOe9YU8MkmJwGhoMybl8A==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/once": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
"@sinclair/typebox": "^0.32.4",
|
||||
"apexcharts": "^3.45.1",
|
||||
"bootstrap": "^4.6.2",
|
||||
"compression": "^1.8.1",
|
||||
"cookieconsent": "^3.1.1",
|
||||
"cors": "^2.8.5",
|
||||
"dotenv": "^17.2.3",
|
||||
@@ -78,4 +79,4 @@
|
||||
"target": "http://localhost:8070"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
function getPrefix() {
|
||||
if (process.argv.includes('--prod') || process.argv.includes('-p')) {
|
||||
return `${__dirname}/dist/frontend-hideyoshi.com`
|
||||
return `${__dirname}/dist/frontend-hideyoshi.com/browser/`
|
||||
}
|
||||
return `${__dirname}/src`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user