build: try to build web separately.
parent
ee494a5bc0
commit
aac0f297df
|
|
@ -90,6 +90,12 @@ jobs:
|
||||||
registry: ${{ secrets.FIT2CLOUD_REGISTRY_HOST }}
|
registry: ${{ secrets.FIT2CLOUD_REGISTRY_HOST }}
|
||||||
username: ${{ secrets.FIT2CLOUD_REGISTRY_USERNAME }}
|
username: ${{ secrets.FIT2CLOUD_REGISTRY_USERNAME }}
|
||||||
password: ${{ secrets.FIT2CLOUD_REGISTRY_PASSWORD }}
|
password: ${{ secrets.FIT2CLOUD_REGISTRY_PASSWORD }}
|
||||||
|
- name: Build Web
|
||||||
|
run: |
|
||||||
|
docker buildx build --target web-build --output type=local,dest=./web-build-output . -f installer/Dockerfile
|
||||||
|
rm -rf ./ui
|
||||||
|
cp -r ./web-build-output/ui ./
|
||||||
|
rm -rf ./web-build-output
|
||||||
- name: Docker Buildx (build-and-push)
|
- name: Docker Buildx (build-and-push)
|
||||||
run: |
|
run: |
|
||||||
sudo sync && echo 3 | sudo tee /proc/sys/vm/drop_caches && free -m
|
sudo sync && echo 3 | sudo tee /proc/sys/vm/drop_caches && free -m
|
||||||
|
|
@ -150,6 +156,12 @@ jobs:
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
- name: Build Web
|
||||||
|
run: |
|
||||||
|
docker buildx build --target web-build --output type=local,dest=./web-build-output . -f installer/Dockerfile
|
||||||
|
rm -rf ./ui
|
||||||
|
cp -r ./web-build-output/ui ./
|
||||||
|
rm -rf ./web-build-output
|
||||||
- name: Docker Buildx (build-and-push)
|
- name: Docker Buildx (build-and-push)
|
||||||
run: |
|
run: |
|
||||||
sudo sync && echo 3 | sudo tee /proc/sys/vm/drop_caches && free -m
|
sudo sync && echo 3 | sudo tee /proc/sys/vm/drop_caches && free -m
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
FROM node:24-alpine AS web-build
|
FROM node:24-alpine AS web-build
|
||||||
COPY ui ui
|
COPY ui ui
|
||||||
RUN cd ui && \
|
RUN cd ui && ls -la && if [ -d "dist" ]; then exit 0; fi && \
|
||||||
npm install --prefer-offline --no-audit && \
|
npm install --prefer-offline --no-audit && \
|
||||||
npm install -D concurrently && \
|
npm install -D concurrently && \
|
||||||
NODE_OPTIONS="--max-old-space-size=4096" npx concurrently "npm run build" "npm run build-chat" && \
|
NODE_OPTIONS="--max-old-space-size=4096" npx concurrently "npm run build" "npm run build-chat" && \
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue