Skip to content

Commit

Permalink
chore: introduce nx integrated repo
Browse files Browse the repository at this point in the history
  • Loading branch information
khaledmashaly committed Jan 19, 2023
1 parent 3c5c639 commit 82b634b
Show file tree
Hide file tree
Showing 318 changed files with 45,761 additions and 43,342 deletions.
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
node_modules/
.angular
5 changes: 1 addition & 4 deletions packages/frontend/.editorconfig → .editorconfig
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Editor configuration, see https://editorconfig.org
# Editor configuration, see http://editorconfig.org
root = true

[*]
Expand All @@ -8,9 +8,6 @@ indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.ts]
quote_type = single

[*.md]
max_line_length = off
trim_trailing_whitespace = false
42 changes: 42 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"root": true,
"ignorePatterns": ["**/*"],
"plugins": ["@nrwl/nx"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {
"@nrwl/nx/enforce-module-boundaries": [
"error",
{
"enforceBuildableLibDependency": true,
"allow": [],
"depConstraints": [
{
"sourceTag": "*",
"onlyDependOnLibsWithTags": ["*"]
}
]
}
]
}
},
{
"files": ["*.ts", "*.tsx"],
"extends": ["plugin:@nrwl/nx/typescript"],
"rules": {}
},
{
"files": ["*.js", "*.jsx"],
"extends": ["plugin:@nrwl/nx/javascript"],
"rules": {}
},
{
"files": ["*.spec.ts", "*.spec.tsx", "*.spec.js", "*.spec.jsx"],
"env": {
"jest": true
},
"rules": {}
}
]
}
8 changes: 7 additions & 1 deletion .github/workflows/release-backend.yml
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Release backend
on:
push:
branches:
- dev
- main

jobs:
Release-Backend:
Expand All @@ -18,6 +18,12 @@ jobs:
- name: Fail if tag already exists
run: "! docker manifest inspect activepieces/backend:${{ env.RELEASE }}"

- name: install npm deps
run: npm ci

- name: build backend
run: npx nx build backend

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

Expand Down
43 changes: 0 additions & 43 deletions .github/workflows/release-frontend.yml
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,44 +1 @@
name: Release frontend

on:
push:
branches:
- dev

jobs:
Release-Frontend:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3

- name: Set RELEASE env var from package.json
run: echo RELEASE=$(node --print "require('./packages/frontend/package.json').version") >> $GITHUB_ENV

- name: Fail if tag already exists
run: "! docker manifest inspect activepieces/frontend:${{ env.RELEASE }}"

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v3
with:
context: .
file: ./frontend.Dockerfile
platforms: |
linux/amd64
linux/arm64
push: true
tags: |
activepieces/frontend:${{ env.RELEASE }}
activepieces/frontend:latest
28 changes: 5 additions & 23 deletions .gitignore
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,23 +1,3 @@
.gradle
build/
.history/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
!**/src/test/**/build/

### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
out/
!**/src/main/**/out/
!**/src/test/**/out/

dist/
coverage/
node_modules/

# See http://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
Expand All @@ -39,7 +19,10 @@ node_modules

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

# misc
/.sass-cache
Expand All @@ -55,6 +38,5 @@ testem.log
.DS_Store
Thumbs.db

.pnpm-store
packages/backend/resources/activepieces-engine.js
packages/docs-generator/src/index.js
.angular
activepieces-engine.js
14 changes: 0 additions & 14 deletions .gitpod.yml

This file was deleted.

File renamed without changes.
Empty file modified .prettierignore
100755 → 100644
Empty file.
Empty file modified .prettierrc
100755 → 100644
Empty file.
8 changes: 8 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"recommendations": [
"nrwl.angular-console",
"esbenp.prettier-vscode",
"dbaeumer.vscode-eslint",
"firsttris.vscode-jest-runner"
]
}
21 changes: 21 additions & 0 deletions backend-base.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM node:18.13.0-bullseye

RUN apt-get update \
&& apt-get install -y --no-install-recommends \
locales \
locales-all \
libcap-dev \
&& rm -rf /var/lib/apt/lists/*

# Set the locale
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8

RUN npm i -g --unsafe-perm \
npm@9.3.1 \
webpack@5.74.0 \
webpack-cli@4.10.0 \
webpack-node-externals@3.0.0

COPY packages/backend/src/assets/default.cf /usr/local/etc/isolate
37 changes: 0 additions & 37 deletions backend.Dockerfile

This file was deleted.

28 changes: 28 additions & 0 deletions backend.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
FROM node:18.13.0-bullseye

RUN apt-get update \
&& apt-get install -y --no-install-recommends \
locales \
locales-all \
libcap-dev \
&& rm -rf /var/lib/apt/lists/*

# Set the locale
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8

RUN npm i -g --unsafe-perm \
npm@9.3.1 \
webpack@5.74.0 \
webpack-cli@4.10.0 \
webpack-node-externals@3.0.0

COPY packages/backend/src/assets/default.cf /usr/local/etc/isolate

WORKDIR /usr/src/app
COPY . .

EXPOSE 3000

ENTRYPOINT ["node", "dist/packages/backend/main.js"]
69 changes: 69 additions & 0 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
version: '3.0'

services:
backend:
image: activepieces/backend-base:0.0.7
environment:
AP_JWT_SECRET: super-secret
AP_POSTGRES_HOST: postgres
AP_REDIS_HOST: redis
privileged: true
ports:
- "3000:3000"
- "9229:9229"
networks:
- activepieces_dev
volumes:
- ./:/usr/src/app
working_dir: /usr/src/app
entrypoint:
- npx
- nx
- serve
- backend
depends_on:
- postgres
- redis

frontend:
image: node:18.13.0-bullseye
ports:
- "4200:4200"
- "9222:9222"
networks:
- activepieces_dev
volumes:
- ./:/usr/src/app
working_dir: /usr/src/app
entrypoint:
- npx
- nx
- serve
- frontend
depends_on:
- backend

postgres:
image: postgres:14.4
environment:
POSTGRES_DB: activepieces
POSTGRES_USER: postgres
POSTGRES_PASSWORD: A79Vm5D4p2VQHOp2gd5
volumes:
- postgres_data_dev:/var/lib/postgresql/data
networks:
- activepieces_dev

redis:
image: redis:7.0.7
volumes:
- redis_data_dev:/data
networks:
- activepieces_dev

volumes:
postgres_data_dev:
redis_data_dev:

networks:
activepieces_dev:
9 changes: 6 additions & 3 deletions docker-compose.yml
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: '3.0'

services:
backend:
image: activepieces/backend:0.1.19
image: activepieces/backend:0.2.0-alpha1
container_name: activepieces-backend
restart: unless-stopped
privileged: true
Expand All @@ -21,12 +21,15 @@ services:
- AP_REDIS_HOST=redis
- AP_REDIS_PORT=6379
- AP_FRONTEND_URL=http://localhost:8080
## - AP_BACKEND_URL=http://localhost:8080/api
- AP_BACKEND_URL=http://localhost:8080/api
networks:
- activepieces
entrypoint:
- node
- dist/packages/backend/main.js

frontend:
image: activepieces/frontend:0.1.73
image: activepieces/frontend:0.2.0-alpha1
container_name: activepieces-frontend
restart: unless-stopped
depends_on: [ backend ]
Expand Down
2 changes: 0 additions & 2 deletions docs/.gitignore

This file was deleted.

Loading

0 comments on commit 82b634b

Please sign in to comment.