Skip to content

Commit

Permalink
Merge branch 'feat/react' of github.com:activepieces/activepieces int…
Browse files Browse the repository at this point in the history
…o react/unified-ai
  • Loading branch information
anasbarg committed Sep 3, 2024
2 parents 352f86a + 9aac2af commit 1c179bc
Show file tree
Hide file tree
Showing 115 changed files with 2,796 additions and 2,982 deletions.
9 changes: 9 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -1199,6 +1199,15 @@
"contributions": [
"plugin"
]
},
{
"login": "emmanuel-ferdman",
"name": "Emmanuel Ferdman",
"avatar_url": "https://avatars.githubusercontent.com/u/35470921?v=4",
"profile": "https://github.com/emmanuel-ferdman",
"contributions": [
"doc"
]
}
],
"commitType": "docs"
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/automate-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
linux/amd64
push: true
tags: |
ghcr.io/activepieces/activepieces-cloud:${{ env.RELEASE }}.${{ github.sha }}
ghcr.io/activepieces/activepieces-cloud:${{ env.RELEASE }}.${{ github.sha }}.beta
- name: Configure SSH
run: |
Expand All @@ -54,11 +54,11 @@ jobs:
SSH_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
SSH_HOST: ${{ secrets.DEV_OPS_HOST }}

- name: Deploy Web
- name: Deploy React
run: |
ssh ops -t -t 'bash -ic "cd mrsk && kamal deploy --version ${{ env.RELEASE }}.${{ github.sha }} --config-file=config/web.yml --skip-push; exit"'
ssh ops -t -t 'bash -ic "cd mrsk && kamal deploy --version ${{ env.RELEASE }}.${{ github.sha }}.beta --config-file=config/react.yml --skip-push; exit"'
- name: Deploy Workers
run: |
ssh ops -t -t 'bash -ic "cd mrsk && kamal deploy --version ${{ env.RELEASE }}.${{ github.sha }} --config-file=config/workers.yml --skip-push; exit"'
# - name: Deploy Workers
# run: |
# ssh ops -t -t 'bash -ic "cd mrsk && kamal deploy --version ${{ env.RELEASE }}.${{ github.sha }} --config-file=config/workers.yml --skip-push; exit"'

64 changes: 55 additions & 9 deletions Dockerfile
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 && \
Expand All @@ -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
Expand All @@ -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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ Not into coding but still interested in contributing? Come join our [Discord](ht
<td align="center" valign="top" width="14.28%"><a href="https://raamyy.netlify.app"><img src="https://avatars.githubusercontent.com/u/29176293?v=4?s=100" width="100px;" alt="Ramy Gamal"/><br /><sub><b>Ramy Gamal</b></sub></a><br /><a href="#plugin-Raamyy" title="Plugin/utility libraries">🔌</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://alexandrudanpop.dev/"><img src="https://avatars.githubusercontent.com/u/15979292?v=4?s=100" width="100px;" alt="Alexandru-Dan Pop"/><br /><sub><b>Alexandru-Dan Pop</b></sub></a><br /><a href="https://github.com/activepieces/activepieces/commits?author=alexandrudanpop" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Trayshmhirk"><img src="https://avatars.githubusercontent.com/u/112286458?v=4?s=100" width="100px;" alt="Frank Micheal "/><br /><sub><b>Frank Micheal </b></sub></a><br /><a href="#plugin-Trayshmhirk" title="Plugin/utility libraries">🔌</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/emmanuel-ferdman"><img src="https://avatars.githubusercontent.com/u/35470921?v=4?s=100" width="100px;" alt="Emmanuel Ferdman"/><br /><sub><b>Emmanuel Ferdman</b></sub></a><br /><a href="https://github.com/activepieces/activepieces/commits?author=emmanuel-ferdman" title="Documentation">📖</a></td>
</tr>
</tbody>
</table>
Expand Down
2 changes: 1 addition & 1 deletion docs/about/license.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: ""
icon: 'file-contract'
---

Activepieces' **core** is released as open source under the [MIT license](https://github.com/activepieces/activepieces/blob/main/LICENSE) and enterprise / cloud editions features are released under [Commercial License](https://github.com/activepieces/activepieces/blob/main/LICENSE.enterprise)
Activepieces' **core** is released as open source under the [MIT license](https://github.com/activepieces/activepieces/blob/main/LICENSE) and enterprise / cloud editions features are released under [Commercial License](https://github.com/activepieces/activepieces/blob/main/packages/ee/LICENSE)

The MIT license is a permissive license that grants users the freedom to use, modify, or distribute the software without any significant restrictions. The only requirement is that you include the license notice along with the software when distributing it.

Expand Down
1 change: 0 additions & 1 deletion docs/endpoints/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
12 changes: 5 additions & 7 deletions docs/install/configurations/environment-variables.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@ description: ''

To configure activepieces, you will need to set some environment variables, There is file called `.env` at the root directory for our main repo.

<Tip>
When you execute the deploy.sh script in the Docker installation tutorial, it
will produce these values.
</Tip>
<Tip> When you execute the [tools/deploy.sh](https://github.com/activepieces/activepieces/blob/main/tools/deploy.sh) script in the Docker installation tutorial,
it will produce these values. </Tip>

## Environment Variables

Expand All @@ -20,10 +18,10 @@ To configure activepieces, you will need to set some environment variables, Ther
| `AP_EXECUTION_MODE` | You can choose between 'SANDBOXED' or 'UNSANDBOXED' as possible values. If you decide to change this, make sure to carefully read the next below. | `UNSANDBOXED` | |
| `AP_FLOW_WORKER_CONCURRENCY` | The number of different flows can be processed in same time | `10` |
| `AP_SCHEDULED_WORKER_CONCURRENCY` | The number of different scheduled flows can be processed in same time | `10` |
| `AP_ENCRYPTION_KEY` | ❗️ Encryption key used for connections | `None` |
| `AP_ENCRYPTION_KEY` | ❗️ Encryption key used for connections is a 16-character hexadecimal key. You can generate one using the following command: `openssl rand -hex 16`. | `None` |
| `AP_EXECUTION_DATA_RETENTION_DAYS` | The number of days to retain execution data, logs and events. | `None` | |
| `AP_FRONTEND_URL` | ❗️ Url that will be used to specify redirect url and webhook url. | `None` | [https://demo.activepieces.com/api](https://demo.activepieces.com/api) |
| `AP_JWT_SECRET` | ❗️ Encryption key used for generating JWT tokens | `None` | [https://demo.activepieces.com](https://demo.activepieces.com) |
| `AP_JWT_SECRET` | ❗️ Encryption key used for generating JWT tokens is a 32-character hexadecimal key. You can generate one using the following command: `openssl rand -hex 32`. | `None` | [https://demo.activepieces.com](https://demo.activepieces.com) |
| `AP_QUEUE_MODE` | The queue mode to use. (MEMORY / REDIS) | `MEMORY` | |
| `AP_QUEUE_UI_ENABLED` | Enable the queue UI (only works with redis) | `true` | |
| `AP_QUEUE_UI_USERNAME` | The username for the queue UI. This is required if `AP_QUEUE_UI_ENABLED` is set to `true`. | None | |
Expand All @@ -33,7 +31,7 @@ To configure activepieces, you will need to set some environment variables, Ther
| `AP_PIECES_SYNC_MODE` | `AP_PIECES_SYNC_MODE`: `NONE` for no metadata syncing / 'OFFICIAL_AUTO' for automatic syncing for pieces metadata from cloud | `OFFICIAL_AUTO` |
| `AP_POSTGRES_DATABASE` | ❗️ The name of the PostgreSQL database | `None` | |
| `AP_POSTGRES_HOST` | ❗️ The hostname or IP address of the PostgreSQL server | `None` | |
| `AP_POSTGRES_PASSWORD` | ❗️ The password for the PostgreSQL user | `None` | |
| `AP_POSTGRES_PASSWORD` | ❗️ The password for the PostgreSQL, you can generate a 32-character hexadecimal key using the following command: `openssl rand -hex 32`. | `None` | |
| `AP_POSTGRES_PORT` | ❗️ The port number for the PostgreSQL server | `None` | |
| `AP_POSTGRES_USERNAME` | ❗️ The username for the PostgreSQL user | `None` | |
| `AP_POSTGRES_USE_SSL` | Use SSL to connect the postgres database | `false` | |
Expand Down
4 changes: 0 additions & 4 deletions docs/install/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,6 @@ Deploy Activepieces as a single Docker container using the SQLite database.
Easily install on RepoCloud using this template, maintained by the community.
</Card>

<Card title="AWS (StackSnap)" icon="cloud" color="#805ac3" href="https://klo.dev/stacksnap/apps/activepieces">
1-Click Install on AWS with the StackSnap template, maintained by the community.
</Card>

<Card title="Zeabur" icon={
<svg viewBox="0 0 294 229" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M113.865 144.888H293.087V229H0V144.888H82.388L195.822 84.112H0V0H293.087V84.112L113.865 144.888Z" fill="black"/>
Expand Down
2 changes: 1 addition & 1 deletion docs/security/permissions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ The supported roles in Activepieces are:
- Retry Runs
- View Connections
- Edit Connections
- View/Resolve Issues
- View Issues
- Resolve Issues
- View Project Members

Expand Down
Loading

0 comments on commit 1c179bc

Please sign in to comment.