Skip to content
Merged

Stage #9271

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ aliases:
sudo apt install -y curl gnupg git libappindicator3-1 ca-certificates binutils icnsutils graphicsmagick
python3 -m pip install packaging setuptools
sudo npm install --quiet [email protected] -g
sudo npm install --quiet [email protected] -g
sudo npm config set python /usr/bin/python

- &install-yarn
Expand Down
14 changes: 14 additions & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"browserslist",
"Buildable",
"buildjet",
"buildtools",
"buildx",
"Buildx",
"Bykey",
Expand All @@ -62,6 +63,7 @@
"Chetan",
"childout",
"Chinthagunta",
"choco",
"circlon",
"Civo",
"CIVO",
Expand Down Expand Up @@ -181,6 +183,7 @@
"Harbir",
"healthcheck",
"honeycombio",
"hostedtoolcache",
"Hoster",
"hubstaff",
"HUBSTAFF",
Expand All @@ -194,6 +197,7 @@
"icrud",
"ienvironment",
"IKPI",
"ilammy",
"ILIKE",
"ilinked",
"immer",
Expand Down Expand Up @@ -331,6 +335,11 @@
"mjml",
"modelcontextprotocol",
"msedge",
"msbuild",
"MSVC",
"msvc",
"msvs",
"MSVS",
"MSYS",
"Mustero",
"napi",
Expand All @@ -352,6 +361,7 @@
"nodenext",
"nodownload",
"NOLOGO",
"norestart",
"notif",
"npmignore",
"NQCHAR",
Expand Down Expand Up @@ -440,6 +450,7 @@
"resave",
"rfdc",
"roboto",
"runneradmin",
"Ruslan",
"sarif",
"SARIF",
Expand Down Expand Up @@ -522,6 +533,7 @@
"toastr",
"togglefullscreen",
"TOOLSDIRECTORY",
"Toolset",
"traefik",
"trasp",
"Trendshift",
Expand Down Expand Up @@ -568,8 +580,10 @@
"VMFE",
"VULTR",
"Wakatime",
"WARPBUILD",
"wasabisys",
"wbars",
"Wbem",
"wdth",
"webapp",
"websockets",
Expand Down
4 changes: 2 additions & 2 deletions .deploy/api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ RUN apk --update add bash && npm i -g npm@9 \
# Verify installed versions
RUN node --version && npm --version && python3 --version

RUN npm install --quiet [email protected] -g && npm install yarn -g --force
RUN npm install --quiet [email protected] -g && npm install yarn -g --force && npm install --quiet [email protected] -g
RUN mkdir /srv/gauzy && chown -R node:node /srv/gauzy

COPY wait .deploy/api/entrypoint.prod.sh .deploy/api/entrypoint.compose.sh /
Expand Down Expand Up @@ -192,7 +192,7 @@ RUN apk --update add bash && npm i -g npm@9 \
# Verify installed versions
RUN node --version && npm --version && python3 --version

RUN npm install --quiet [email protected] -g && npm install yarn -g --force
RUN npm install --quiet [email protected] -g && npm install yarn -g --force && npm install --quiet [email protected] -g
RUN mkdir /srv/gauzy && chown -R node:node /srv/gauzy

USER node:node
Expand Down
18 changes: 13 additions & 5 deletions .deploy/mcp-auth/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,11 @@ FROM node:20.18.1-alpine3.19 AS dependencies
LABEL maintainer="[email protected]"
LABEL org.opencontainers.image.source="https://github.com/ever-co/ever-gauzy"

RUN apk add --no-cache python3 make g++ \
&& npm install yarn -g --force
RUN apk add --no-cache python3 python3-dev py3-pip py3-setuptools build-base gcc g++ make autoconf automake git \
&& npm install --quiet [email protected] -g \
&& npm install yarn -g --force \
&& npm install --quiet [email protected] -g

RUN mkdir /srv/gauzy-mcp-auth && chown -R node:node /srv/gauzy-mcp-auth

USER node:node
Expand All @@ -60,9 +63,10 @@ COPY --chown=node:node packages/core/package.json ./packages/core/
COPY --chown=node:node packages/plugin/package.json ./packages/plugin/
COPY --chown=node:node packages/utils/package.json ./packages/utils/
COPY --chown=node:node lerna.json package.json yarn.lock ./
COPY --chown=node:node .scripts/postinstall.js ./.scripts/

RUN yarn install --network-timeout 1000000 --frozen-lockfile --ignore-scripts \
&& npm rebuild bcrypt better-sqlite3 --build-from-source \
&& yarn postinstall.manual \
&& yarn cache clean

COPY --chown=node:node apps/mcp-auth ./apps/mcp-auth
Expand Down Expand Up @@ -100,17 +104,21 @@ RUN yarn build:mcp-auth:prod
# Only prod dependencies
FROM node:20.18.1-alpine3.19 AS proddependencies

RUN apk add --no-cache python3 make g++
RUN apk add --no-cache python3 python3-dev py3-pip py3-setuptools build-base gcc g++ make autoconf automake git \
&& npm install --quiet [email protected] -g \
&& npm install yarn -g --force \
&& npm install --quiet [email protected] -g

USER node:node

WORKDIR /srv/gauzy-mcp-auth

COPY --chown=node:node --from=build /srv/gauzy-mcp-auth/dist .
COPY --chown=node:node lerna.json package.json yarn.lock ./
COPY --chown=node:node .scripts/postinstall.js ./.scripts/

RUN yarn install --network-timeout 1000000 --frozen-lockfile --ignore-scripts --production \
&& npm rebuild bcrypt better-sqlite3 --build-from-source \
&& yarn postinstall.manual \
&& yarn cache clean

# PROD
Expand Down
17 changes: 12 additions & 5 deletions .deploy/mcp/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,10 @@ FROM node:20.18.1-alpine3.19 AS dependencies
LABEL maintainer="[email protected]"
LABEL org.opencontainers.image.source="https://github.com/ever-co/ever-gauzy"

RUN apk add --no-cache python3 make g++ \
&& npm install yarn -g --force
RUN apk add --no-cache python3 python3-dev py3-pip py3-setuptools build-base gcc g++ make autoconf automake git \
&& npm install --quiet [email protected] -g \
&& npm install yarn -g --force \
&& npm install --quiet [email protected] -g

RUN mkdir /srv/gauzy-mcp && chown -R node:node /srv/gauzy-mcp

Expand All @@ -106,9 +108,10 @@ COPY --chown=node:node packages/constants/package.json ./packages/constants/
COPY --chown=node:node packages/contracts/package.json ./packages/contracts/
COPY --chown=node:node packages/utils/package.json ./packages/utils/
COPY --chown=node:node lerna.json package.json yarn.lock ./
COPY --chown=node:node .scripts/postinstall.js ./.scripts/

RUN yarn install --network-timeout 1000000 --frozen-lockfile --ignore-scripts \
&& npm rebuild bcrypt --build-from-source \
&& yarn postinstall.manual \
&& yarn cache clean

COPY --chown=node:node apps/mcp ./apps/mcp
Expand Down Expand Up @@ -145,17 +148,21 @@ RUN yarn build:mcp:prod
# Only prod dependencies
FROM node:20.18.1-alpine3.19 AS proddependencies

RUN apk add --no-cache python3 make g++
RUN apk add --no-cache python3 python3-dev py3-pip py3-setuptools build-base gcc g++ make autoconf automake git \
&& npm install --quiet [email protected] -g \
&& npm install yarn -g --force \
&& npm install --quiet [email protected] -g

USER node:node

WORKDIR /srv/gauzy-mcp

COPY --chown=node:node --from=build /srv/gauzy-mcp/dist .
COPY --chown=node:node lerna.json package.json yarn.lock ./
COPY --chown=node:node .scripts/postinstall.js ./.scripts/

RUN yarn install --network-timeout 1000000 --frozen-lockfile --ignore-scripts --production \
&& npm rebuild bcrypt --build-from-source \
&& yarn postinstall.manual \
&& yarn cache clean

# PROD
Expand Down
78 changes: 66 additions & 12 deletions .github/workflows/agent-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Install Node.js, NPM and Yarn
uses: buildjet/setup-node@v4
with:
node-version: 20.18.1
node-version: 22.21.1
cache: "yarn"

- name: Change permissions
Expand All @@ -39,10 +39,10 @@ jobs:
run: python3 -m pip install packaging setuptools

- name: Install latest version of NPM
run: "sudo npm install -g npm@9"
run: "sudo npm install -g npm@10.9.4"

- name: Install node-gyp package
run: "sudo npm install --quiet -g [email protected]"
- name: Install globally node-gyp, ts-node and nx packages
run: "sudo npm install --quiet -g [email protected] [email protected] [email protected]"

- name: Install Yarn dependencies
run: "yarn install --network-timeout 1000000 --frozen-lockfile --ignore-scripts"
Expand Down Expand Up @@ -93,17 +93,17 @@ jobs:
- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@v4
with:
node-version: 20.18.1
node-version: 22.21.1
cache: "yarn"

- name: Fix node-gyp and Python
run: python3 -m pip install --break-system-packages packaging setuptools

- name: Install latest version of NPM
run: "sudo npm install -g npm@9"
run: "sudo npm install -g npm@10.9.4"

- name: Install node-gyp package
run: "sudo npm install --quiet -g [email protected]"
- name: Install globally node-gyp, ts-node and nx packages
run: "sudo npm install --quiet -g [email protected] [email protected] [email protected]"

- name: Install Yarn dependencies
run: "yarn install --network-timeout 1000000 --frozen-lockfile --ignore-scripts"
Expand Down Expand Up @@ -157,17 +157,49 @@ jobs:
- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@v4
with:
node-version: 20.18.1
node-version: 22.21.1
cache: "yarn"

- name: Install Visual Studio 2022 Build Tools (VCTools)
shell: powershell
run: |
choco install -y visualstudio2022buildtools --execution-timeout=21600 --package-parameters "--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended --includeOptional --passive --norestart"

- name: Configure node-gyp to use VS 2022
shell: powershell
run: |
"GYP_MSVS_VERSION=2022" | Out-File -FilePath $env:GITHUB_ENV -Append
"npm_config_msvs_version=2022" | Out-File -FilePath $env:GITHUB_ENV -Append

- name: Fix node-gyp and Python
run: python3 -m pip install packaging setuptools

- name: Setup MSVC (VS 2022 dev env)
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64

- name: Install latest version of NPM
run: "npm install -g npm@9"
run: "npm install -g npm@10.9.4"

- name: Install node-gyp package
run: "npm install --quiet -g [email protected]"
- name: Install globally node-gyp, ts-node and nx packages
run: "npm install --quiet -g [email protected] [email protected] [email protected]"

- name: Configure npm python for node-gyp
shell: powershell
run: |
$py = (Get-Command python.exe).Source
Write-Host "python is: $py"
"npm_config_python=$py" | Out-File -FilePath $env:GITHUB_ENV -Append
"PYTHON=$py" | Out-File -FilePath $env:GITHUB_ENV -Append

- name: Show tool versions
shell: powershell
run: |
node -v
npm -v
python --version
python -c "import sys; print(sys.executable)"

- name: Install Yarn dependencies
run: "yarn install --network-timeout 1000000 --frozen-lockfile --ignore-scripts"
Expand All @@ -188,8 +220,30 @@ jobs:
AGENT_APP_DESCRIPTION: "Ever Gauzy Agent"
AGENT_APP_ID: "com.ever.gauzyagent"

- name: Add Yarn/Node/npm-global/node_modules to GITHUB_PATH
shell: powershell
run: |
$yarnPath = (Get-Command yarn).Source | Split-Path -Parent
$nodePath = (Get-Command node).Source | Split-Path -Parent
$npmGlobalBin = npm config get prefix
$localBin = Join-Path $PWD "node_modules\.bin"
echo $localBin >> $env:GITHUB_PATH
echo $npmGlobalBin >> $env:GITHUB_PATH
echo $yarnPath >> $env:GITHUB_PATH
if ($nodePath -ne $yarnPath) { echo $nodePath >> $env:GITHUB_PATH }
Write-Host "Added to GITHUB_PATH: $localBin, $npmGlobalBin, $yarnPath, $nodePath"

- name: Build Agent
shell: powershell
run: |
Write-Host "=== Command locations ==="
Write-Host "Node: $((Get-Command node -ErrorAction SilentlyContinue).Source)"
Write-Host "Yarn: $((Get-Command yarn -ErrorAction SilentlyContinue).Source)"
Write-Host "ts-node: $((Get-Command ts-node -ErrorAction SilentlyContinue).Source)"
Write-Host "cross-env: $((Get-Command cross-env -ErrorAction SilentlyContinue).Source)"
Write-Host "nx: $((Get-Command nx -ErrorAction SilentlyContinue).Source)"
Write-Host ""
Write-Host "=== Starting build ==="
yarn build:agent:windows:release:gh
env:
USE_HARD_LINKS: false
Expand Down
Loading
Loading