forked from activepieces/activepieces
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feat/react' of github.com:activepieces/activepieces int…
…o react/unified-ai
- Loading branch information
Showing
115 changed files
with
2,796 additions
and
2,982 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
FROM node:18.19-bullseye-slim AS base | ||
|
||
|
||
# Use a cache mount for apt to speed up the process | ||
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ | ||
--mount=type=cache,target=/var/lib/apt,sharing=locked \ | ||
apt-get update && \ | ||
|
@@ -14,7 +14,33 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ | |
npm install -g node-gyp | ||
|
||
RUN npm i -g \ | ||
[email protected] | ||
[email protected] \ | ||
[email protected] \ | ||
[email protected] | ||
|
||
# Set the locale | ||
ENV LANG en_US.UTF-8 | ||
ENV LANGUAGE en_US:en | ||
ENV LC_ALL en_US.UTF-8 | ||
|
||
|
||
RUN apt-get update \ | ||
&& apt-get install -y --no-install-recommends \ | ||
locales \ | ||
locales-all \ | ||
libcap-dev \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# install isolated-vm in a parent directory to avoid linking the package in every sandbox | ||
RUN cd /usr/src && npm i [email protected] | ||
|
||
RUN pnpm store add \ | ||
@tsconfig/[email protected] \ | ||
@types/[email protected] \ | ||
[email protected] | ||
|
||
### STAGE 1: Build ### | ||
FROM base AS build | ||
|
||
# Set up backend | ||
WORKDIR /usr/src/app | ||
|
@@ -23,30 +49,50 @@ COPY . . | |
COPY .npmrc package.json package-lock.json ./ | ||
RUN npm ci | ||
|
||
RUN npx nx run-many --target=build --projects=server-api --configuration production --skip-nx-cache | ||
RUN npx nx build react-ui --mode cloud --skip-nx-cache | ||
RUN npx nx run-many --target=build --projects=server-api --configuration production | ||
RUN npx nx run-many --target=build --projects=react-ui | ||
|
||
# Install backend production dependencies | ||
RUN cd dist/packages/server/api && npm install --production --force | ||
|
||
### STAGE 2: Run ### | ||
FROM node:18.19-bullseye-slim AS run | ||
FROM base AS run | ||
|
||
# Set up backend | ||
WORKDIR /usr/src/app | ||
|
||
COPY packages/server/api/src/assets/default.cf /usr/local/etc/isolate | ||
|
||
# Install Nginx and gettext for envsubst | ||
RUN apt-get update && apt-get install -y nginx gettext | ||
|
||
# Copy Nginx configuration template | ||
COPY nginx.react.conf /etc/nginx/nginx.conf | ||
|
||
COPY --from=base /usr/src/app/LICENSE . | ||
COPY --from=build /usr/src/app/LICENSE . | ||
|
||
RUN mkdir -p /usr/src/app/dist/packages/server/ | ||
RUN mkdir -p /usr/src/app/dist/packages/engine/ | ||
RUN mkdir -p /usr/src/app/dist/packages/shared/ | ||
|
||
# Copy Output files to appropriate directory from build stage | ||
COPY --from=base /usr/src/app/packages packages | ||
COPY --from=build /usr/src/app/dist/packages/engine/ /usr/src/app/dist/packages/engine/ | ||
COPY --from=build /usr/src/app/dist/packages/server/ /usr/src/app/dist/packages/server/ | ||
COPY --from=build /usr/src/app/dist/packages/shared/ /usr/src/app/dist/packages/shared/ | ||
|
||
RUN cd /usr/src/app/dist/packages/server/api/ && npm install --production --force | ||
|
||
# | ||
# Copy Output files to appropriate directory from build stage | ||
COPY --from=build /usr/src/app/packages packages | ||
# Copy frontend files to Nginx document root directory from build stage | ||
COPY --from=base /usr/src/app/dist/packages/react-ui /usr/share/nginx/html/ | ||
COPY --from=build /usr/src/app/dist/packages/react-ui /usr/share/nginx/html/ | ||
|
||
LABEL service=activepieces | ||
|
||
CMD ["nginx", "-g", "daemon off;"] | ||
# Set up entrypoint script | ||
COPY docker-entrypoint.sh . | ||
RUN chmod +x docker-entrypoint.sh | ||
ENTRYPOINT ["./docker-entrypoint.sh"] | ||
|
||
EXPOSE 80 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,6 @@ API keys are generated under the platform dashboard at this moment to manage mul | |
Please contact [email protected] for more information. | ||
</Tip> | ||
|
||
|
||
### Authentication: | ||
|
||
The API uses "API keys" to authenticate requests. You can view and manage your API keys from the Platform Dashboard. After creating the API keys, you can pass the API key as a Bearer token in the header. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.