From 949b62d13f6e95c863852d78b14aa1413016ac62 Mon Sep 17 00:00:00 2001 From: pablohashescobar Date: Thu, 1 Dec 2022 19:18:10 +0530 Subject: [PATCH] build: create frontend and backend dockerfiles docker compose and scripts --- .dockerignore | 6 ++ apiserver/Dockerfile | 56 ++++++++++++++++++ apiserver/bin/takeoff | 6 ++ apiserver/gunicorn.config.py | 6 ++ apiserver/requirements/production.txt | 4 +- apps/{app => plane}/.prettierrc | 0 apps/plane/Dockerfile | 47 +++++++++++++++ .../components/command-palette/index.tsx | 0 .../components/command-palette/shortcuts.tsx | 0 .../components/dnd/StrictModeDroppable.tsx | 0 .../components/forms/EmailCodeForm.tsx | 0 .../components/forms/EmailPasswordForm.tsx | 0 .../project/ConfirmProjectDeletion.tsx | 0 .../components/project/CreateProjectModal.tsx | 0 .../project/SendProjectInvitationModal.tsx | 0 .../project/cycles/ConfirmCycleDeletion.tsx | 0 .../cycles/CreateUpdateCyclesModal.tsx | 0 .../components/project/cycles/CycleView.tsx | 0 .../project/issues/BoardView/SingleBoard.tsx | 0 .../project/issues/BoardView/index.tsx | 0 .../BoardView/state/ConfirmStateDeletion.tsx | 0 .../state/CreateUpdateStateModal.tsx | 0 .../project/issues/ConfirmIssueDeletion.tsx | 0 .../CreateUpdateIssueModal/SelectAssignee.tsx | 0 .../CreateUpdateIssueModal/SelectCycles.tsx | 0 .../CreateUpdateIssueModal/SelectLabels.tsx | 0 .../SelectParentIssues.tsx | 0 .../CreateUpdateIssueModal/SelectPriority.tsx | 0 .../CreateUpdateIssueModal/SelectProject.tsx | 0 .../CreateUpdateIssueModal/SelectState.tsx | 0 .../issues/CreateUpdateIssueModal/index.tsx | 0 .../project/issues/ListView/index.tsx | 0 .../project/issues/PreviewModal/index.tsx | 0 .../issue-detail/IssueDetailSidebar.tsx | 0 .../issues/issue-detail/activity/index.tsx | 0 .../issue-detail/comment/IssueCommentCard.tsx | 0 .../comment/IssueCommentSection.tsx | 0 .../issues/my-issues/ChangeStateDropdown.tsx | 0 .../components/project/memberInvitations.tsx | 0 .../components/socialbuttons/google-login.tsx | 0 .../components/toast-alert/index.tsx | 0 .../workspace/ConfirmWorkspaceDeletion.tsx | 0 .../SendWorkspaceInvitationModal.tsx | 0 .../configuration/axios-configuration.ts | 0 apps/{app => plane}/constants/api-routes.ts | 0 apps/{app => plane}/constants/common.ts | 0 apps/{app => plane}/constants/fetch-keys.ts | 0 .../constants/seo/seo-variables.ts | 0 .../constants/theme.context.constants.ts | 0 .../constants/toast.context.constants.ts | 0 .../contexts/globalContextProvider.tsx | 0 .../{app => plane}/contexts/theme.context.tsx | 0 .../{app => plane}/contexts/toast.context.tsx | 0 apps/{app => plane}/contexts/user.context.tsx | 0 apps/{app => plane}/google.d.ts | 0 apps/{app => plane}/layouts/AdminLayout.tsx | 0 apps/{app => plane}/layouts/Container.tsx | 0 apps/{app => plane}/layouts/DefaultLayout.tsx | 0 .../layouts/Navbar/DefaultTopBar.tsx | 0 .../{app => plane}/layouts/Navbar/Sidebar.tsx | 0 apps/{app => plane}/layouts/types.d.ts | 0 apps/{app => plane}/lib/cookie.ts | 0 .../lib/hoc/withAuthWrapper.tsx | 0 .../lib/hooks/useAutosizeTextArea.tsx | 0 .../lib/hooks/useIssuesProperties.tsx | 0 .../lib/hooks/useLocalStorage.tsx | 0 apps/{app => plane}/lib/hooks/useTheme.tsx | 0 apps/{app => plane}/lib/hooks/useToast.tsx | 0 apps/{app => plane}/lib/hooks/useUser.tsx | 0 apps/{app => plane}/lib/redirect.ts | 0 .../lib/services/api.service.ts | 0 .../lib/services/authentication.service.ts | 0 .../lib/services/cycles.services.ts | 0 .../lib/services/file.services.ts | 0 .../lib/services/issues.services.ts | 0 .../lib/services/project.service.ts | 0 .../lib/services/state.services.ts | 0 .../lib/services/user.service.ts | 0 .../lib/services/workspace.service.ts | 0 apps/{app => plane}/next-env.d.ts | 0 apps/{app => plane}/next.config.js | 8 +++ apps/{app => plane}/package.json | 0 apps/{app => plane}/pages/_app.tsx | 0 apps/{app => plane}/pages/api/hello.ts | 0 .../{app => plane}/pages/create-workspace.tsx | 0 apps/{app => plane}/pages/editor.tsx | 0 apps/{app => plane}/pages/index.tsx | 0 apps/{app => plane}/pages/invitations.tsx | 0 apps/{app => plane}/pages/magic-sign-in.tsx | 0 apps/{app => plane}/pages/me/my-issues.tsx | 0 apps/{app => plane}/pages/me/profile.tsx | 0 .../pages/me/workspace-invites.tsx | 0 .../pages/projects/[projectId]/cycles.tsx | 0 .../projects/[projectId]/issues/[issueId].tsx | 0 .../projects/[projectId]/issues/index.tsx | 0 .../pages/projects/[projectId]/members.tsx | 0 .../pages/projects/[projectId]/settings.tsx | 0 apps/{app => plane}/pages/projects/index.tsx | 0 apps/{app => plane}/pages/signin.tsx | 0 .../[invitationId].tsx | 0 apps/{app => plane}/pages/workspace/index.tsx | 0 .../pages/workspace/members.tsx | 0 .../pages/workspace/settings.tsx | 0 apps/{app => plane}/postcss.config.js | 0 .../public/animated-icons/uploading.json | 0 apps/{app => plane}/public/favicon.ico | Bin .../public/favicon/android-chrome-192x192.png | Bin .../public/favicon/android-chrome-512x512.png | Bin .../public/favicon/apple-touch-icon.png | Bin .../public/favicon/favicon-16x16.png | Bin .../public/favicon/favicon-32x32.png | Bin .../{app => plane}/public/favicon/favicon.ico | Bin apps/{app => plane}/public/logo.png | Bin apps/{app => plane}/public/logos/github.png | Bin apps/{app => plane}/public/sign-in-bg.png | Bin .../{app => plane}/public/sign-up-sideimg.svg | 0 apps/{app => plane}/public/site-image.png | Bin .../public/site.webmanifest.json | 0 apps/{app => plane}/public/vercel.svg | 0 apps/{app => plane}/styles/editor.css | 0 apps/{app => plane}/styles/globals.css | 0 apps/{app => plane}/tailwind.config.js | 0 apps/{app => plane}/tsconfig.json | 0 apps/{app => plane}/types/index.d.ts | 0 apps/{app => plane}/types/invitation.d.ts | 0 apps/{app => plane}/types/issues.d.ts | 0 apps/{app => plane}/types/projects.d.ts | 0 apps/{app => plane}/types/sprints.d.ts | 0 apps/{app => plane}/types/state.d.ts | 0 apps/{app => plane}/types/users.d.ts | 0 apps/{app => plane}/types/workspace.d.ts | 0 apps/{app => plane}/ui/Breadcrumbs/index.tsx | 0 apps/{app => plane}/ui/Button/index.tsx | 0 .../{app => plane}/ui/CustomListbox/index.tsx | 0 .../ui/CustomListbox/types.d.ts | 0 apps/{app => plane}/ui/EmptySpace/index.tsx | 0 apps/{app => plane}/ui/HeaderButton/index.tsx | 0 apps/{app => plane}/ui/Input/index.tsx | 0 apps/{app => plane}/ui/Input/types.d.ts | 0 apps/{app => plane}/ui/Modal/index.tsx | 0 .../{app => plane}/ui/SearchListbox/index.tsx | 0 .../ui/SearchListbox/types.d.ts | 0 apps/{app => plane}/ui/Select/index.tsx | 0 apps/{app => plane}/ui/Select/types.d.ts | 0 apps/{app => plane}/ui/Spinner/index.tsx | 0 apps/{app => plane}/ui/TextArea/index.tsx | 0 apps/{app => plane}/ui/TextArea/types.d.ts | 0 apps/{app => plane}/ui/Tooltip/index.tsx | 0 apps/{app => plane}/ui/index.ts | 0 apps/{app => plane}/yarn.lock | 0 docker-compose.yml | 54 +++++++++++++++++ 151 files changed, 186 insertions(+), 1 deletion(-) create mode 100644 .dockerignore create mode 100644 apiserver/Dockerfile create mode 100755 apiserver/bin/takeoff create mode 100644 apiserver/gunicorn.config.py rename apps/{app => plane}/.prettierrc (100%) create mode 100644 apps/plane/Dockerfile rename apps/{app => plane}/components/command-palette/index.tsx (100%) rename apps/{app => plane}/components/command-palette/shortcuts.tsx (100%) rename apps/{app => plane}/components/dnd/StrictModeDroppable.tsx (100%) rename apps/{app => plane}/components/forms/EmailCodeForm.tsx (100%) rename apps/{app => plane}/components/forms/EmailPasswordForm.tsx (100%) rename apps/{app => plane}/components/project/ConfirmProjectDeletion.tsx (100%) rename apps/{app => plane}/components/project/CreateProjectModal.tsx (100%) rename apps/{app => plane}/components/project/SendProjectInvitationModal.tsx (100%) rename apps/{app => plane}/components/project/cycles/ConfirmCycleDeletion.tsx (100%) rename apps/{app => plane}/components/project/cycles/CreateUpdateCyclesModal.tsx (100%) rename apps/{app => plane}/components/project/cycles/CycleView.tsx (100%) rename apps/{app => plane}/components/project/issues/BoardView/SingleBoard.tsx (100%) rename apps/{app => plane}/components/project/issues/BoardView/index.tsx (100%) rename apps/{app => plane}/components/project/issues/BoardView/state/ConfirmStateDeletion.tsx (100%) rename apps/{app => plane}/components/project/issues/BoardView/state/CreateUpdateStateModal.tsx (100%) rename apps/{app => plane}/components/project/issues/ConfirmIssueDeletion.tsx (100%) rename apps/{app => plane}/components/project/issues/CreateUpdateIssueModal/SelectAssignee.tsx (100%) rename apps/{app => plane}/components/project/issues/CreateUpdateIssueModal/SelectCycles.tsx (100%) rename apps/{app => plane}/components/project/issues/CreateUpdateIssueModal/SelectLabels.tsx (100%) rename apps/{app => plane}/components/project/issues/CreateUpdateIssueModal/SelectParentIssues.tsx (100%) rename apps/{app => plane}/components/project/issues/CreateUpdateIssueModal/SelectPriority.tsx (100%) rename apps/{app => plane}/components/project/issues/CreateUpdateIssueModal/SelectProject.tsx (100%) rename apps/{app => plane}/components/project/issues/CreateUpdateIssueModal/SelectState.tsx (100%) rename apps/{app => plane}/components/project/issues/CreateUpdateIssueModal/index.tsx (100%) rename apps/{app => plane}/components/project/issues/ListView/index.tsx (100%) rename apps/{app => plane}/components/project/issues/PreviewModal/index.tsx (100%) rename apps/{app => plane}/components/project/issues/issue-detail/IssueDetailSidebar.tsx (100%) rename apps/{app => plane}/components/project/issues/issue-detail/activity/index.tsx (100%) rename apps/{app => plane}/components/project/issues/issue-detail/comment/IssueCommentCard.tsx (100%) rename apps/{app => plane}/components/project/issues/issue-detail/comment/IssueCommentSection.tsx (100%) rename apps/{app => plane}/components/project/issues/my-issues/ChangeStateDropdown.tsx (100%) rename apps/{app => plane}/components/project/memberInvitations.tsx (100%) rename apps/{app => plane}/components/socialbuttons/google-login.tsx (100%) rename apps/{app => plane}/components/toast-alert/index.tsx (100%) rename apps/{app => plane}/components/workspace/ConfirmWorkspaceDeletion.tsx (100%) rename apps/{app => plane}/components/workspace/SendWorkspaceInvitationModal.tsx (100%) rename apps/{app => plane}/configuration/axios-configuration.ts (100%) rename apps/{app => plane}/constants/api-routes.ts (100%) rename apps/{app => plane}/constants/common.ts (100%) rename apps/{app => plane}/constants/fetch-keys.ts (100%) rename apps/{app => plane}/constants/seo/seo-variables.ts (100%) rename apps/{app => plane}/constants/theme.context.constants.ts (100%) rename apps/{app => plane}/constants/toast.context.constants.ts (100%) rename apps/{app => plane}/contexts/globalContextProvider.tsx (100%) rename apps/{app => plane}/contexts/theme.context.tsx (100%) rename apps/{app => plane}/contexts/toast.context.tsx (100%) rename apps/{app => plane}/contexts/user.context.tsx (100%) rename apps/{app => plane}/google.d.ts (100%) rename apps/{app => plane}/layouts/AdminLayout.tsx (100%) rename apps/{app => plane}/layouts/Container.tsx (100%) rename apps/{app => plane}/layouts/DefaultLayout.tsx (100%) rename apps/{app => plane}/layouts/Navbar/DefaultTopBar.tsx (100%) rename apps/{app => plane}/layouts/Navbar/Sidebar.tsx (100%) rename apps/{app => plane}/layouts/types.d.ts (100%) rename apps/{app => plane}/lib/cookie.ts (100%) rename apps/{app => plane}/lib/hoc/withAuthWrapper.tsx (100%) rename apps/{app => plane}/lib/hooks/useAutosizeTextArea.tsx (100%) rename apps/{app => plane}/lib/hooks/useIssuesProperties.tsx (100%) rename apps/{app => plane}/lib/hooks/useLocalStorage.tsx (100%) rename apps/{app => plane}/lib/hooks/useTheme.tsx (100%) rename apps/{app => plane}/lib/hooks/useToast.tsx (100%) rename apps/{app => plane}/lib/hooks/useUser.tsx (100%) rename apps/{app => plane}/lib/redirect.ts (100%) rename apps/{app => plane}/lib/services/api.service.ts (100%) rename apps/{app => plane}/lib/services/authentication.service.ts (100%) rename apps/{app => plane}/lib/services/cycles.services.ts (100%) rename apps/{app => plane}/lib/services/file.services.ts (100%) rename apps/{app => plane}/lib/services/issues.services.ts (100%) rename apps/{app => plane}/lib/services/project.service.ts (100%) rename apps/{app => plane}/lib/services/state.services.ts (100%) rename apps/{app => plane}/lib/services/user.service.ts (100%) rename apps/{app => plane}/lib/services/workspace.service.ts (100%) rename apps/{app => plane}/next-env.d.ts (100%) rename apps/{app => plane}/next.config.js (54%) rename apps/{app => plane}/package.json (100%) rename apps/{app => plane}/pages/_app.tsx (100%) rename apps/{app => plane}/pages/api/hello.ts (100%) rename apps/{app => plane}/pages/create-workspace.tsx (100%) rename apps/{app => plane}/pages/editor.tsx (100%) rename apps/{app => plane}/pages/index.tsx (100%) rename apps/{app => plane}/pages/invitations.tsx (100%) rename apps/{app => plane}/pages/magic-sign-in.tsx (100%) rename apps/{app => plane}/pages/me/my-issues.tsx (100%) rename apps/{app => plane}/pages/me/profile.tsx (100%) rename apps/{app => plane}/pages/me/workspace-invites.tsx (100%) rename apps/{app => plane}/pages/projects/[projectId]/cycles.tsx (100%) rename apps/{app => plane}/pages/projects/[projectId]/issues/[issueId].tsx (100%) rename apps/{app => plane}/pages/projects/[projectId]/issues/index.tsx (100%) rename apps/{app => plane}/pages/projects/[projectId]/members.tsx (100%) rename apps/{app => plane}/pages/projects/[projectId]/settings.tsx (100%) rename apps/{app => plane}/pages/projects/index.tsx (100%) rename apps/{app => plane}/pages/signin.tsx (100%) rename apps/{app => plane}/pages/workspace-member-invitation/[invitationId].tsx (100%) rename apps/{app => plane}/pages/workspace/index.tsx (100%) rename apps/{app => plane}/pages/workspace/members.tsx (100%) rename apps/{app => plane}/pages/workspace/settings.tsx (100%) rename apps/{app => plane}/postcss.config.js (100%) rename apps/{app => plane}/public/animated-icons/uploading.json (100%) rename apps/{app => plane}/public/favicon.ico (100%) rename apps/{app => plane}/public/favicon/android-chrome-192x192.png (100%) rename apps/{app => plane}/public/favicon/android-chrome-512x512.png (100%) rename apps/{app => plane}/public/favicon/apple-touch-icon.png (100%) rename apps/{app => plane}/public/favicon/favicon-16x16.png (100%) rename apps/{app => plane}/public/favicon/favicon-32x32.png (100%) rename apps/{app => plane}/public/favicon/favicon.ico (100%) rename apps/{app => plane}/public/logo.png (100%) rename apps/{app => plane}/public/logos/github.png (100%) rename apps/{app => plane}/public/sign-in-bg.png (100%) rename apps/{app => plane}/public/sign-up-sideimg.svg (100%) rename apps/{app => plane}/public/site-image.png (100%) rename apps/{app => plane}/public/site.webmanifest.json (100%) rename apps/{app => plane}/public/vercel.svg (100%) rename apps/{app => plane}/styles/editor.css (100%) rename apps/{app => plane}/styles/globals.css (100%) rename apps/{app => plane}/tailwind.config.js (100%) rename apps/{app => plane}/tsconfig.json (100%) rename apps/{app => plane}/types/index.d.ts (100%) rename apps/{app => plane}/types/invitation.d.ts (100%) rename apps/{app => plane}/types/issues.d.ts (100%) rename apps/{app => plane}/types/projects.d.ts (100%) rename apps/{app => plane}/types/sprints.d.ts (100%) rename apps/{app => plane}/types/state.d.ts (100%) rename apps/{app => plane}/types/users.d.ts (100%) rename apps/{app => plane}/types/workspace.d.ts (100%) rename apps/{app => plane}/ui/Breadcrumbs/index.tsx (100%) rename apps/{app => plane}/ui/Button/index.tsx (100%) rename apps/{app => plane}/ui/CustomListbox/index.tsx (100%) rename apps/{app => plane}/ui/CustomListbox/types.d.ts (100%) rename apps/{app => plane}/ui/EmptySpace/index.tsx (100%) rename apps/{app => plane}/ui/HeaderButton/index.tsx (100%) rename apps/{app => plane}/ui/Input/index.tsx (100%) rename apps/{app => plane}/ui/Input/types.d.ts (100%) rename apps/{app => plane}/ui/Modal/index.tsx (100%) rename apps/{app => plane}/ui/SearchListbox/index.tsx (100%) rename apps/{app => plane}/ui/SearchListbox/types.d.ts (100%) rename apps/{app => plane}/ui/Select/index.tsx (100%) rename apps/{app => plane}/ui/Select/types.d.ts (100%) rename apps/{app => plane}/ui/Spinner/index.tsx (100%) rename apps/{app => plane}/ui/TextArea/index.tsx (100%) rename apps/{app => plane}/ui/TextArea/types.d.ts (100%) rename apps/{app => plane}/ui/Tooltip/index.tsx (100%) rename apps/{app => plane}/ui/index.ts (100%) rename apps/{app => plane}/yarn.lock (100%) create mode 100644 docker-compose.yml diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 000000000..45ff21c4f --- /dev/null +++ b/.dockerignore @@ -0,0 +1,6 @@ +.git +*.pyc +.env +venv +node_modules +npm-debug.log \ No newline at end of file diff --git a/apiserver/Dockerfile b/apiserver/Dockerfile new file mode 100644 index 000000000..c0057369c --- /dev/null +++ b/apiserver/Dockerfile @@ -0,0 +1,56 @@ +FROM python:3.8.14-alpine3.16 AS backend + +ENV PYTHONUNBUFFERED 1 + +WORKDIR /code + +RUN apk --update --no-cache add \ + "libpq~=14" \ + "libxslt~=1.1" \ + "nodejs-current~=18" \ + "xmlsec~=1.2" + + +COPY requirements.txt ./ +COPY requirements ./requirements +RUN apk --update --no-cache --virtual .build-deps add \ + "bash~=5.1" \ + "g++~=11.2" \ + "gcc~=11.2" \ + "cargo~=1.60" \ + "git~=2" \ + "make~=4.3" \ + "libffi-dev~=3.4" \ + "libxml2-dev~=2.9" \ + "libxslt-dev~=1.1" \ + "xmlsec-dev~=1.2" \ + "postgresql13-dev~=13" \ + "libmaxminddb~=1.6" \ + && \ + pip install -r requirements.txt --compile --no-cache-dir \ + && \ + apk del .build-deps + + +RUN addgroup -S plane && \ + adduser -S captain -G plane + +RUN chown captain.plane /code + +USER captain + +# Add in Django deps and generate Django's static files +COPY manage.py manage.py +COPY plane plane/ +COPY templates templates/ + +COPY gunicorn.config.py ./ + +COPY bin/takeoff ./takeoff +USER captain + +# Expose container port and run entry point script +EXPOSE 8000 + +# ENTRYPOINT [ "./takeoff" ] +CMD python manage.py migrate && python manage.py rqworker & exec gunicorn plane.wsgi -k gthread --workers 8 --bind 0.0.0.0:8000 --config gunicorn.config.py --max-requests 10000 --max-requests-jitter 1000 --access-logfile - diff --git a/apiserver/bin/takeoff b/apiserver/bin/takeoff new file mode 100755 index 000000000..3ec0d34ac --- /dev/null +++ b/apiserver/bin/takeoff @@ -0,0 +1,6 @@ +#!/bin/bash +set -e + +python manage.py migrate +python manage.py rqworker & +exec gunicorn plane.wsgi -k gthread --workers 8 --bind 0.0.0.0:8000 --config gunicorn.config.py --max-requests 10000 --max-requests-jitter 1000 --access-logfile - diff --git a/apiserver/gunicorn.config.py b/apiserver/gunicorn.config.py new file mode 100644 index 000000000..67205b5ec --- /dev/null +++ b/apiserver/gunicorn.config.py @@ -0,0 +1,6 @@ +from psycogreen.gevent import patch_psycopg + + +def post_fork(server, worker): + patch_psycopg() + worker.log.info("Made Psycopg2 Green") \ No newline at end of file diff --git a/apiserver/requirements/production.txt b/apiserver/requirements/production.txt index d587c5f18..231d3c0a1 100644 --- a/apiserver/requirements/production.txt +++ b/apiserver/requirements/production.txt @@ -7,4 +7,6 @@ django-storages==1.12.3 boto==2.49.0 django-anymail==8.5 twilio==7.8.2 -django-debug-toolbar==3.2.4 \ No newline at end of file +django-debug-toolbar==3.2.4 +gevent==22.10.2 +psycogreen==1.0.2 \ No newline at end of file diff --git a/apps/app/.prettierrc b/apps/plane/.prettierrc similarity index 100% rename from apps/app/.prettierrc rename to apps/plane/.prettierrc diff --git a/apps/plane/Dockerfile b/apps/plane/Dockerfile new file mode 100644 index 000000000..978b60ef4 --- /dev/null +++ b/apps/plane/Dockerfile @@ -0,0 +1,47 @@ +FROM node:alpine AS builder +RUN apk add --no-cache libc6-compat +RUN apk update +# Set working directory +WORKDIR /app +RUN yarn global add turbo +COPY ./apps ./apps +COPY ./package.json ./package.json +COPY ./.eslintrc.json ./.eslintrc.json +COPY ./turbo.json ./turbo.json +COPY ./yarn.lock ./yarn.lock +RUN turbo prune --scope=plane --docker + +# Add lockfile and package.json's of isolated subworkspace +FROM node:alpine AS installer +RUN apk add --no-cache libc6-compat +RUN apk update +WORKDIR /app + +# First install the dependencies (as they change less often) +COPY .gitignore .gitignore +COPY --from=builder /app/out/json/ . +COPY --from=builder /app/out/yarn.lock ./yarn.lock +RUN yarn install + +# Build the project +COPY --from=builder /app/out/full/ . +COPY turbo.json turbo.json +RUN yarn turbo run build --filter=plane... + +FROM node:alpine AS runner +WORKDIR /app + +# Don't run production as root +RUN addgroup --system --gid 1001 nodejs +RUN adduser --system --uid 1001 nextjs +USER nextjs + +COPY --from=installer /app/apps/plane/next.config.js . +COPY --from=installer /app/apps/plane/package.json . + +# Automatically leverage output traces to reduce image size +# https://nextjs.org/docs/advanced-features/output-file-tracing +COPY --from=installer --chown=nextjs:nodejs /app/apps/plane/.next/standalone ./ +COPY --from=installer --chown=nextjs:nodejs /app/apps/plane/.next/static ./apps/plane/.next/static + +CMD node apps/plane/server.js \ No newline at end of file diff --git a/apps/app/components/command-palette/index.tsx b/apps/plane/components/command-palette/index.tsx similarity index 100% rename from apps/app/components/command-palette/index.tsx rename to apps/plane/components/command-palette/index.tsx diff --git a/apps/app/components/command-palette/shortcuts.tsx b/apps/plane/components/command-palette/shortcuts.tsx similarity index 100% rename from apps/app/components/command-palette/shortcuts.tsx rename to apps/plane/components/command-palette/shortcuts.tsx diff --git a/apps/app/components/dnd/StrictModeDroppable.tsx b/apps/plane/components/dnd/StrictModeDroppable.tsx similarity index 100% rename from apps/app/components/dnd/StrictModeDroppable.tsx rename to apps/plane/components/dnd/StrictModeDroppable.tsx diff --git a/apps/app/components/forms/EmailCodeForm.tsx b/apps/plane/components/forms/EmailCodeForm.tsx similarity index 100% rename from apps/app/components/forms/EmailCodeForm.tsx rename to apps/plane/components/forms/EmailCodeForm.tsx diff --git a/apps/app/components/forms/EmailPasswordForm.tsx b/apps/plane/components/forms/EmailPasswordForm.tsx similarity index 100% rename from apps/app/components/forms/EmailPasswordForm.tsx rename to apps/plane/components/forms/EmailPasswordForm.tsx diff --git a/apps/app/components/project/ConfirmProjectDeletion.tsx b/apps/plane/components/project/ConfirmProjectDeletion.tsx similarity index 100% rename from apps/app/components/project/ConfirmProjectDeletion.tsx rename to apps/plane/components/project/ConfirmProjectDeletion.tsx diff --git a/apps/app/components/project/CreateProjectModal.tsx b/apps/plane/components/project/CreateProjectModal.tsx similarity index 100% rename from apps/app/components/project/CreateProjectModal.tsx rename to apps/plane/components/project/CreateProjectModal.tsx diff --git a/apps/app/components/project/SendProjectInvitationModal.tsx b/apps/plane/components/project/SendProjectInvitationModal.tsx similarity index 100% rename from apps/app/components/project/SendProjectInvitationModal.tsx rename to apps/plane/components/project/SendProjectInvitationModal.tsx diff --git a/apps/app/components/project/cycles/ConfirmCycleDeletion.tsx b/apps/plane/components/project/cycles/ConfirmCycleDeletion.tsx similarity index 100% rename from apps/app/components/project/cycles/ConfirmCycleDeletion.tsx rename to apps/plane/components/project/cycles/ConfirmCycleDeletion.tsx diff --git a/apps/app/components/project/cycles/CreateUpdateCyclesModal.tsx b/apps/plane/components/project/cycles/CreateUpdateCyclesModal.tsx similarity index 100% rename from apps/app/components/project/cycles/CreateUpdateCyclesModal.tsx rename to apps/plane/components/project/cycles/CreateUpdateCyclesModal.tsx diff --git a/apps/app/components/project/cycles/CycleView.tsx b/apps/plane/components/project/cycles/CycleView.tsx similarity index 100% rename from apps/app/components/project/cycles/CycleView.tsx rename to apps/plane/components/project/cycles/CycleView.tsx diff --git a/apps/app/components/project/issues/BoardView/SingleBoard.tsx b/apps/plane/components/project/issues/BoardView/SingleBoard.tsx similarity index 100% rename from apps/app/components/project/issues/BoardView/SingleBoard.tsx rename to apps/plane/components/project/issues/BoardView/SingleBoard.tsx diff --git a/apps/app/components/project/issues/BoardView/index.tsx b/apps/plane/components/project/issues/BoardView/index.tsx similarity index 100% rename from apps/app/components/project/issues/BoardView/index.tsx rename to apps/plane/components/project/issues/BoardView/index.tsx diff --git a/apps/app/components/project/issues/BoardView/state/ConfirmStateDeletion.tsx b/apps/plane/components/project/issues/BoardView/state/ConfirmStateDeletion.tsx similarity index 100% rename from apps/app/components/project/issues/BoardView/state/ConfirmStateDeletion.tsx rename to apps/plane/components/project/issues/BoardView/state/ConfirmStateDeletion.tsx diff --git a/apps/app/components/project/issues/BoardView/state/CreateUpdateStateModal.tsx b/apps/plane/components/project/issues/BoardView/state/CreateUpdateStateModal.tsx similarity index 100% rename from apps/app/components/project/issues/BoardView/state/CreateUpdateStateModal.tsx rename to apps/plane/components/project/issues/BoardView/state/CreateUpdateStateModal.tsx diff --git a/apps/app/components/project/issues/ConfirmIssueDeletion.tsx b/apps/plane/components/project/issues/ConfirmIssueDeletion.tsx similarity index 100% rename from apps/app/components/project/issues/ConfirmIssueDeletion.tsx rename to apps/plane/components/project/issues/ConfirmIssueDeletion.tsx diff --git a/apps/app/components/project/issues/CreateUpdateIssueModal/SelectAssignee.tsx b/apps/plane/components/project/issues/CreateUpdateIssueModal/SelectAssignee.tsx similarity index 100% rename from apps/app/components/project/issues/CreateUpdateIssueModal/SelectAssignee.tsx rename to apps/plane/components/project/issues/CreateUpdateIssueModal/SelectAssignee.tsx diff --git a/apps/app/components/project/issues/CreateUpdateIssueModal/SelectCycles.tsx b/apps/plane/components/project/issues/CreateUpdateIssueModal/SelectCycles.tsx similarity index 100% rename from apps/app/components/project/issues/CreateUpdateIssueModal/SelectCycles.tsx rename to apps/plane/components/project/issues/CreateUpdateIssueModal/SelectCycles.tsx diff --git a/apps/app/components/project/issues/CreateUpdateIssueModal/SelectLabels.tsx b/apps/plane/components/project/issues/CreateUpdateIssueModal/SelectLabels.tsx similarity index 100% rename from apps/app/components/project/issues/CreateUpdateIssueModal/SelectLabels.tsx rename to apps/plane/components/project/issues/CreateUpdateIssueModal/SelectLabels.tsx diff --git a/apps/app/components/project/issues/CreateUpdateIssueModal/SelectParentIssues.tsx b/apps/plane/components/project/issues/CreateUpdateIssueModal/SelectParentIssues.tsx similarity index 100% rename from apps/app/components/project/issues/CreateUpdateIssueModal/SelectParentIssues.tsx rename to apps/plane/components/project/issues/CreateUpdateIssueModal/SelectParentIssues.tsx diff --git a/apps/app/components/project/issues/CreateUpdateIssueModal/SelectPriority.tsx b/apps/plane/components/project/issues/CreateUpdateIssueModal/SelectPriority.tsx similarity index 100% rename from apps/app/components/project/issues/CreateUpdateIssueModal/SelectPriority.tsx rename to apps/plane/components/project/issues/CreateUpdateIssueModal/SelectPriority.tsx diff --git a/apps/app/components/project/issues/CreateUpdateIssueModal/SelectProject.tsx b/apps/plane/components/project/issues/CreateUpdateIssueModal/SelectProject.tsx similarity index 100% rename from apps/app/components/project/issues/CreateUpdateIssueModal/SelectProject.tsx rename to apps/plane/components/project/issues/CreateUpdateIssueModal/SelectProject.tsx diff --git a/apps/app/components/project/issues/CreateUpdateIssueModal/SelectState.tsx b/apps/plane/components/project/issues/CreateUpdateIssueModal/SelectState.tsx similarity index 100% rename from apps/app/components/project/issues/CreateUpdateIssueModal/SelectState.tsx rename to apps/plane/components/project/issues/CreateUpdateIssueModal/SelectState.tsx diff --git a/apps/app/components/project/issues/CreateUpdateIssueModal/index.tsx b/apps/plane/components/project/issues/CreateUpdateIssueModal/index.tsx similarity index 100% rename from apps/app/components/project/issues/CreateUpdateIssueModal/index.tsx rename to apps/plane/components/project/issues/CreateUpdateIssueModal/index.tsx diff --git a/apps/app/components/project/issues/ListView/index.tsx b/apps/plane/components/project/issues/ListView/index.tsx similarity index 100% rename from apps/app/components/project/issues/ListView/index.tsx rename to apps/plane/components/project/issues/ListView/index.tsx diff --git a/apps/app/components/project/issues/PreviewModal/index.tsx b/apps/plane/components/project/issues/PreviewModal/index.tsx similarity index 100% rename from apps/app/components/project/issues/PreviewModal/index.tsx rename to apps/plane/components/project/issues/PreviewModal/index.tsx diff --git a/apps/app/components/project/issues/issue-detail/IssueDetailSidebar.tsx b/apps/plane/components/project/issues/issue-detail/IssueDetailSidebar.tsx similarity index 100% rename from apps/app/components/project/issues/issue-detail/IssueDetailSidebar.tsx rename to apps/plane/components/project/issues/issue-detail/IssueDetailSidebar.tsx diff --git a/apps/app/components/project/issues/issue-detail/activity/index.tsx b/apps/plane/components/project/issues/issue-detail/activity/index.tsx similarity index 100% rename from apps/app/components/project/issues/issue-detail/activity/index.tsx rename to apps/plane/components/project/issues/issue-detail/activity/index.tsx diff --git a/apps/app/components/project/issues/issue-detail/comment/IssueCommentCard.tsx b/apps/plane/components/project/issues/issue-detail/comment/IssueCommentCard.tsx similarity index 100% rename from apps/app/components/project/issues/issue-detail/comment/IssueCommentCard.tsx rename to apps/plane/components/project/issues/issue-detail/comment/IssueCommentCard.tsx diff --git a/apps/app/components/project/issues/issue-detail/comment/IssueCommentSection.tsx b/apps/plane/components/project/issues/issue-detail/comment/IssueCommentSection.tsx similarity index 100% rename from apps/app/components/project/issues/issue-detail/comment/IssueCommentSection.tsx rename to apps/plane/components/project/issues/issue-detail/comment/IssueCommentSection.tsx diff --git a/apps/app/components/project/issues/my-issues/ChangeStateDropdown.tsx b/apps/plane/components/project/issues/my-issues/ChangeStateDropdown.tsx similarity index 100% rename from apps/app/components/project/issues/my-issues/ChangeStateDropdown.tsx rename to apps/plane/components/project/issues/my-issues/ChangeStateDropdown.tsx diff --git a/apps/app/components/project/memberInvitations.tsx b/apps/plane/components/project/memberInvitations.tsx similarity index 100% rename from apps/app/components/project/memberInvitations.tsx rename to apps/plane/components/project/memberInvitations.tsx diff --git a/apps/app/components/socialbuttons/google-login.tsx b/apps/plane/components/socialbuttons/google-login.tsx similarity index 100% rename from apps/app/components/socialbuttons/google-login.tsx rename to apps/plane/components/socialbuttons/google-login.tsx diff --git a/apps/app/components/toast-alert/index.tsx b/apps/plane/components/toast-alert/index.tsx similarity index 100% rename from apps/app/components/toast-alert/index.tsx rename to apps/plane/components/toast-alert/index.tsx diff --git a/apps/app/components/workspace/ConfirmWorkspaceDeletion.tsx b/apps/plane/components/workspace/ConfirmWorkspaceDeletion.tsx similarity index 100% rename from apps/app/components/workspace/ConfirmWorkspaceDeletion.tsx rename to apps/plane/components/workspace/ConfirmWorkspaceDeletion.tsx diff --git a/apps/app/components/workspace/SendWorkspaceInvitationModal.tsx b/apps/plane/components/workspace/SendWorkspaceInvitationModal.tsx similarity index 100% rename from apps/app/components/workspace/SendWorkspaceInvitationModal.tsx rename to apps/plane/components/workspace/SendWorkspaceInvitationModal.tsx diff --git a/apps/app/configuration/axios-configuration.ts b/apps/plane/configuration/axios-configuration.ts similarity index 100% rename from apps/app/configuration/axios-configuration.ts rename to apps/plane/configuration/axios-configuration.ts diff --git a/apps/app/constants/api-routes.ts b/apps/plane/constants/api-routes.ts similarity index 100% rename from apps/app/constants/api-routes.ts rename to apps/plane/constants/api-routes.ts diff --git a/apps/app/constants/common.ts b/apps/plane/constants/common.ts similarity index 100% rename from apps/app/constants/common.ts rename to apps/plane/constants/common.ts diff --git a/apps/app/constants/fetch-keys.ts b/apps/plane/constants/fetch-keys.ts similarity index 100% rename from apps/app/constants/fetch-keys.ts rename to apps/plane/constants/fetch-keys.ts diff --git a/apps/app/constants/seo/seo-variables.ts b/apps/plane/constants/seo/seo-variables.ts similarity index 100% rename from apps/app/constants/seo/seo-variables.ts rename to apps/plane/constants/seo/seo-variables.ts diff --git a/apps/app/constants/theme.context.constants.ts b/apps/plane/constants/theme.context.constants.ts similarity index 100% rename from apps/app/constants/theme.context.constants.ts rename to apps/plane/constants/theme.context.constants.ts diff --git a/apps/app/constants/toast.context.constants.ts b/apps/plane/constants/toast.context.constants.ts similarity index 100% rename from apps/app/constants/toast.context.constants.ts rename to apps/plane/constants/toast.context.constants.ts diff --git a/apps/app/contexts/globalContextProvider.tsx b/apps/plane/contexts/globalContextProvider.tsx similarity index 100% rename from apps/app/contexts/globalContextProvider.tsx rename to apps/plane/contexts/globalContextProvider.tsx diff --git a/apps/app/contexts/theme.context.tsx b/apps/plane/contexts/theme.context.tsx similarity index 100% rename from apps/app/contexts/theme.context.tsx rename to apps/plane/contexts/theme.context.tsx diff --git a/apps/app/contexts/toast.context.tsx b/apps/plane/contexts/toast.context.tsx similarity index 100% rename from apps/app/contexts/toast.context.tsx rename to apps/plane/contexts/toast.context.tsx diff --git a/apps/app/contexts/user.context.tsx b/apps/plane/contexts/user.context.tsx similarity index 100% rename from apps/app/contexts/user.context.tsx rename to apps/plane/contexts/user.context.tsx diff --git a/apps/app/google.d.ts b/apps/plane/google.d.ts similarity index 100% rename from apps/app/google.d.ts rename to apps/plane/google.d.ts diff --git a/apps/app/layouts/AdminLayout.tsx b/apps/plane/layouts/AdminLayout.tsx similarity index 100% rename from apps/app/layouts/AdminLayout.tsx rename to apps/plane/layouts/AdminLayout.tsx diff --git a/apps/app/layouts/Container.tsx b/apps/plane/layouts/Container.tsx similarity index 100% rename from apps/app/layouts/Container.tsx rename to apps/plane/layouts/Container.tsx diff --git a/apps/app/layouts/DefaultLayout.tsx b/apps/plane/layouts/DefaultLayout.tsx similarity index 100% rename from apps/app/layouts/DefaultLayout.tsx rename to apps/plane/layouts/DefaultLayout.tsx diff --git a/apps/app/layouts/Navbar/DefaultTopBar.tsx b/apps/plane/layouts/Navbar/DefaultTopBar.tsx similarity index 100% rename from apps/app/layouts/Navbar/DefaultTopBar.tsx rename to apps/plane/layouts/Navbar/DefaultTopBar.tsx diff --git a/apps/app/layouts/Navbar/Sidebar.tsx b/apps/plane/layouts/Navbar/Sidebar.tsx similarity index 100% rename from apps/app/layouts/Navbar/Sidebar.tsx rename to apps/plane/layouts/Navbar/Sidebar.tsx diff --git a/apps/app/layouts/types.d.ts b/apps/plane/layouts/types.d.ts similarity index 100% rename from apps/app/layouts/types.d.ts rename to apps/plane/layouts/types.d.ts diff --git a/apps/app/lib/cookie.ts b/apps/plane/lib/cookie.ts similarity index 100% rename from apps/app/lib/cookie.ts rename to apps/plane/lib/cookie.ts diff --git a/apps/app/lib/hoc/withAuthWrapper.tsx b/apps/plane/lib/hoc/withAuthWrapper.tsx similarity index 100% rename from apps/app/lib/hoc/withAuthWrapper.tsx rename to apps/plane/lib/hoc/withAuthWrapper.tsx diff --git a/apps/app/lib/hooks/useAutosizeTextArea.tsx b/apps/plane/lib/hooks/useAutosizeTextArea.tsx similarity index 100% rename from apps/app/lib/hooks/useAutosizeTextArea.tsx rename to apps/plane/lib/hooks/useAutosizeTextArea.tsx diff --git a/apps/app/lib/hooks/useIssuesProperties.tsx b/apps/plane/lib/hooks/useIssuesProperties.tsx similarity index 100% rename from apps/app/lib/hooks/useIssuesProperties.tsx rename to apps/plane/lib/hooks/useIssuesProperties.tsx diff --git a/apps/app/lib/hooks/useLocalStorage.tsx b/apps/plane/lib/hooks/useLocalStorage.tsx similarity index 100% rename from apps/app/lib/hooks/useLocalStorage.tsx rename to apps/plane/lib/hooks/useLocalStorage.tsx diff --git a/apps/app/lib/hooks/useTheme.tsx b/apps/plane/lib/hooks/useTheme.tsx similarity index 100% rename from apps/app/lib/hooks/useTheme.tsx rename to apps/plane/lib/hooks/useTheme.tsx diff --git a/apps/app/lib/hooks/useToast.tsx b/apps/plane/lib/hooks/useToast.tsx similarity index 100% rename from apps/app/lib/hooks/useToast.tsx rename to apps/plane/lib/hooks/useToast.tsx diff --git a/apps/app/lib/hooks/useUser.tsx b/apps/plane/lib/hooks/useUser.tsx similarity index 100% rename from apps/app/lib/hooks/useUser.tsx rename to apps/plane/lib/hooks/useUser.tsx diff --git a/apps/app/lib/redirect.ts b/apps/plane/lib/redirect.ts similarity index 100% rename from apps/app/lib/redirect.ts rename to apps/plane/lib/redirect.ts diff --git a/apps/app/lib/services/api.service.ts b/apps/plane/lib/services/api.service.ts similarity index 100% rename from apps/app/lib/services/api.service.ts rename to apps/plane/lib/services/api.service.ts diff --git a/apps/app/lib/services/authentication.service.ts b/apps/plane/lib/services/authentication.service.ts similarity index 100% rename from apps/app/lib/services/authentication.service.ts rename to apps/plane/lib/services/authentication.service.ts diff --git a/apps/app/lib/services/cycles.services.ts b/apps/plane/lib/services/cycles.services.ts similarity index 100% rename from apps/app/lib/services/cycles.services.ts rename to apps/plane/lib/services/cycles.services.ts diff --git a/apps/app/lib/services/file.services.ts b/apps/plane/lib/services/file.services.ts similarity index 100% rename from apps/app/lib/services/file.services.ts rename to apps/plane/lib/services/file.services.ts diff --git a/apps/app/lib/services/issues.services.ts b/apps/plane/lib/services/issues.services.ts similarity index 100% rename from apps/app/lib/services/issues.services.ts rename to apps/plane/lib/services/issues.services.ts diff --git a/apps/app/lib/services/project.service.ts b/apps/plane/lib/services/project.service.ts similarity index 100% rename from apps/app/lib/services/project.service.ts rename to apps/plane/lib/services/project.service.ts diff --git a/apps/app/lib/services/state.services.ts b/apps/plane/lib/services/state.services.ts similarity index 100% rename from apps/app/lib/services/state.services.ts rename to apps/plane/lib/services/state.services.ts diff --git a/apps/app/lib/services/user.service.ts b/apps/plane/lib/services/user.service.ts similarity index 100% rename from apps/app/lib/services/user.service.ts rename to apps/plane/lib/services/user.service.ts diff --git a/apps/app/lib/services/workspace.service.ts b/apps/plane/lib/services/workspace.service.ts similarity index 100% rename from apps/app/lib/services/workspace.service.ts rename to apps/plane/lib/services/workspace.service.ts diff --git a/apps/app/next-env.d.ts b/apps/plane/next-env.d.ts similarity index 100% rename from apps/app/next-env.d.ts rename to apps/plane/next-env.d.ts diff --git a/apps/app/next.config.js b/apps/plane/next.config.js similarity index 54% rename from apps/app/next.config.js rename to apps/plane/next.config.js index 6646f0316..03e309fd0 100644 --- a/apps/app/next.config.js +++ b/apps/plane/next.config.js @@ -1,10 +1,18 @@ /** @type {import('next').NextConfig} */ +const path = require("path"); + + const nextConfig = { reactStrictMode: false, swcMinify: true, images: { domains: ["vinci-web.s3.amazonaws.com"], }, + output: 'standalone', + experimental: { + outputFileTracingRoot: path.join(__dirname, "../../"), + transpilePackages: ["ui"], + }, }; module.exports = nextConfig; diff --git a/apps/app/package.json b/apps/plane/package.json similarity index 100% rename from apps/app/package.json rename to apps/plane/package.json diff --git a/apps/app/pages/_app.tsx b/apps/plane/pages/_app.tsx similarity index 100% rename from apps/app/pages/_app.tsx rename to apps/plane/pages/_app.tsx diff --git a/apps/app/pages/api/hello.ts b/apps/plane/pages/api/hello.ts similarity index 100% rename from apps/app/pages/api/hello.ts rename to apps/plane/pages/api/hello.ts diff --git a/apps/app/pages/create-workspace.tsx b/apps/plane/pages/create-workspace.tsx similarity index 100% rename from apps/app/pages/create-workspace.tsx rename to apps/plane/pages/create-workspace.tsx diff --git a/apps/app/pages/editor.tsx b/apps/plane/pages/editor.tsx similarity index 100% rename from apps/app/pages/editor.tsx rename to apps/plane/pages/editor.tsx diff --git a/apps/app/pages/index.tsx b/apps/plane/pages/index.tsx similarity index 100% rename from apps/app/pages/index.tsx rename to apps/plane/pages/index.tsx diff --git a/apps/app/pages/invitations.tsx b/apps/plane/pages/invitations.tsx similarity index 100% rename from apps/app/pages/invitations.tsx rename to apps/plane/pages/invitations.tsx diff --git a/apps/app/pages/magic-sign-in.tsx b/apps/plane/pages/magic-sign-in.tsx similarity index 100% rename from apps/app/pages/magic-sign-in.tsx rename to apps/plane/pages/magic-sign-in.tsx diff --git a/apps/app/pages/me/my-issues.tsx b/apps/plane/pages/me/my-issues.tsx similarity index 100% rename from apps/app/pages/me/my-issues.tsx rename to apps/plane/pages/me/my-issues.tsx diff --git a/apps/app/pages/me/profile.tsx b/apps/plane/pages/me/profile.tsx similarity index 100% rename from apps/app/pages/me/profile.tsx rename to apps/plane/pages/me/profile.tsx diff --git a/apps/app/pages/me/workspace-invites.tsx b/apps/plane/pages/me/workspace-invites.tsx similarity index 100% rename from apps/app/pages/me/workspace-invites.tsx rename to apps/plane/pages/me/workspace-invites.tsx diff --git a/apps/app/pages/projects/[projectId]/cycles.tsx b/apps/plane/pages/projects/[projectId]/cycles.tsx similarity index 100% rename from apps/app/pages/projects/[projectId]/cycles.tsx rename to apps/plane/pages/projects/[projectId]/cycles.tsx diff --git a/apps/app/pages/projects/[projectId]/issues/[issueId].tsx b/apps/plane/pages/projects/[projectId]/issues/[issueId].tsx similarity index 100% rename from apps/app/pages/projects/[projectId]/issues/[issueId].tsx rename to apps/plane/pages/projects/[projectId]/issues/[issueId].tsx diff --git a/apps/app/pages/projects/[projectId]/issues/index.tsx b/apps/plane/pages/projects/[projectId]/issues/index.tsx similarity index 100% rename from apps/app/pages/projects/[projectId]/issues/index.tsx rename to apps/plane/pages/projects/[projectId]/issues/index.tsx diff --git a/apps/app/pages/projects/[projectId]/members.tsx b/apps/plane/pages/projects/[projectId]/members.tsx similarity index 100% rename from apps/app/pages/projects/[projectId]/members.tsx rename to apps/plane/pages/projects/[projectId]/members.tsx diff --git a/apps/app/pages/projects/[projectId]/settings.tsx b/apps/plane/pages/projects/[projectId]/settings.tsx similarity index 100% rename from apps/app/pages/projects/[projectId]/settings.tsx rename to apps/plane/pages/projects/[projectId]/settings.tsx diff --git a/apps/app/pages/projects/index.tsx b/apps/plane/pages/projects/index.tsx similarity index 100% rename from apps/app/pages/projects/index.tsx rename to apps/plane/pages/projects/index.tsx diff --git a/apps/app/pages/signin.tsx b/apps/plane/pages/signin.tsx similarity index 100% rename from apps/app/pages/signin.tsx rename to apps/plane/pages/signin.tsx diff --git a/apps/app/pages/workspace-member-invitation/[invitationId].tsx b/apps/plane/pages/workspace-member-invitation/[invitationId].tsx similarity index 100% rename from apps/app/pages/workspace-member-invitation/[invitationId].tsx rename to apps/plane/pages/workspace-member-invitation/[invitationId].tsx diff --git a/apps/app/pages/workspace/index.tsx b/apps/plane/pages/workspace/index.tsx similarity index 100% rename from apps/app/pages/workspace/index.tsx rename to apps/plane/pages/workspace/index.tsx diff --git a/apps/app/pages/workspace/members.tsx b/apps/plane/pages/workspace/members.tsx similarity index 100% rename from apps/app/pages/workspace/members.tsx rename to apps/plane/pages/workspace/members.tsx diff --git a/apps/app/pages/workspace/settings.tsx b/apps/plane/pages/workspace/settings.tsx similarity index 100% rename from apps/app/pages/workspace/settings.tsx rename to apps/plane/pages/workspace/settings.tsx diff --git a/apps/app/postcss.config.js b/apps/plane/postcss.config.js similarity index 100% rename from apps/app/postcss.config.js rename to apps/plane/postcss.config.js diff --git a/apps/app/public/animated-icons/uploading.json b/apps/plane/public/animated-icons/uploading.json similarity index 100% rename from apps/app/public/animated-icons/uploading.json rename to apps/plane/public/animated-icons/uploading.json diff --git a/apps/app/public/favicon.ico b/apps/plane/public/favicon.ico similarity index 100% rename from apps/app/public/favicon.ico rename to apps/plane/public/favicon.ico diff --git a/apps/app/public/favicon/android-chrome-192x192.png b/apps/plane/public/favicon/android-chrome-192x192.png similarity index 100% rename from apps/app/public/favicon/android-chrome-192x192.png rename to apps/plane/public/favicon/android-chrome-192x192.png diff --git a/apps/app/public/favicon/android-chrome-512x512.png b/apps/plane/public/favicon/android-chrome-512x512.png similarity index 100% rename from apps/app/public/favicon/android-chrome-512x512.png rename to apps/plane/public/favicon/android-chrome-512x512.png diff --git a/apps/app/public/favicon/apple-touch-icon.png b/apps/plane/public/favicon/apple-touch-icon.png similarity index 100% rename from apps/app/public/favicon/apple-touch-icon.png rename to apps/plane/public/favicon/apple-touch-icon.png diff --git a/apps/app/public/favicon/favicon-16x16.png b/apps/plane/public/favicon/favicon-16x16.png similarity index 100% rename from apps/app/public/favicon/favicon-16x16.png rename to apps/plane/public/favicon/favicon-16x16.png diff --git a/apps/app/public/favicon/favicon-32x32.png b/apps/plane/public/favicon/favicon-32x32.png similarity index 100% rename from apps/app/public/favicon/favicon-32x32.png rename to apps/plane/public/favicon/favicon-32x32.png diff --git a/apps/app/public/favicon/favicon.ico b/apps/plane/public/favicon/favicon.ico similarity index 100% rename from apps/app/public/favicon/favicon.ico rename to apps/plane/public/favicon/favicon.ico diff --git a/apps/app/public/logo.png b/apps/plane/public/logo.png similarity index 100% rename from apps/app/public/logo.png rename to apps/plane/public/logo.png diff --git a/apps/app/public/logos/github.png b/apps/plane/public/logos/github.png similarity index 100% rename from apps/app/public/logos/github.png rename to apps/plane/public/logos/github.png diff --git a/apps/app/public/sign-in-bg.png b/apps/plane/public/sign-in-bg.png similarity index 100% rename from apps/app/public/sign-in-bg.png rename to apps/plane/public/sign-in-bg.png diff --git a/apps/app/public/sign-up-sideimg.svg b/apps/plane/public/sign-up-sideimg.svg similarity index 100% rename from apps/app/public/sign-up-sideimg.svg rename to apps/plane/public/sign-up-sideimg.svg diff --git a/apps/app/public/site-image.png b/apps/plane/public/site-image.png similarity index 100% rename from apps/app/public/site-image.png rename to apps/plane/public/site-image.png diff --git a/apps/app/public/site.webmanifest.json b/apps/plane/public/site.webmanifest.json similarity index 100% rename from apps/app/public/site.webmanifest.json rename to apps/plane/public/site.webmanifest.json diff --git a/apps/app/public/vercel.svg b/apps/plane/public/vercel.svg similarity index 100% rename from apps/app/public/vercel.svg rename to apps/plane/public/vercel.svg diff --git a/apps/app/styles/editor.css b/apps/plane/styles/editor.css similarity index 100% rename from apps/app/styles/editor.css rename to apps/plane/styles/editor.css diff --git a/apps/app/styles/globals.css b/apps/plane/styles/globals.css similarity index 100% rename from apps/app/styles/globals.css rename to apps/plane/styles/globals.css diff --git a/apps/app/tailwind.config.js b/apps/plane/tailwind.config.js similarity index 100% rename from apps/app/tailwind.config.js rename to apps/plane/tailwind.config.js diff --git a/apps/app/tsconfig.json b/apps/plane/tsconfig.json similarity index 100% rename from apps/app/tsconfig.json rename to apps/plane/tsconfig.json diff --git a/apps/app/types/index.d.ts b/apps/plane/types/index.d.ts similarity index 100% rename from apps/app/types/index.d.ts rename to apps/plane/types/index.d.ts diff --git a/apps/app/types/invitation.d.ts b/apps/plane/types/invitation.d.ts similarity index 100% rename from apps/app/types/invitation.d.ts rename to apps/plane/types/invitation.d.ts diff --git a/apps/app/types/issues.d.ts b/apps/plane/types/issues.d.ts similarity index 100% rename from apps/app/types/issues.d.ts rename to apps/plane/types/issues.d.ts diff --git a/apps/app/types/projects.d.ts b/apps/plane/types/projects.d.ts similarity index 100% rename from apps/app/types/projects.d.ts rename to apps/plane/types/projects.d.ts diff --git a/apps/app/types/sprints.d.ts b/apps/plane/types/sprints.d.ts similarity index 100% rename from apps/app/types/sprints.d.ts rename to apps/plane/types/sprints.d.ts diff --git a/apps/app/types/state.d.ts b/apps/plane/types/state.d.ts similarity index 100% rename from apps/app/types/state.d.ts rename to apps/plane/types/state.d.ts diff --git a/apps/app/types/users.d.ts b/apps/plane/types/users.d.ts similarity index 100% rename from apps/app/types/users.d.ts rename to apps/plane/types/users.d.ts diff --git a/apps/app/types/workspace.d.ts b/apps/plane/types/workspace.d.ts similarity index 100% rename from apps/app/types/workspace.d.ts rename to apps/plane/types/workspace.d.ts diff --git a/apps/app/ui/Breadcrumbs/index.tsx b/apps/plane/ui/Breadcrumbs/index.tsx similarity index 100% rename from apps/app/ui/Breadcrumbs/index.tsx rename to apps/plane/ui/Breadcrumbs/index.tsx diff --git a/apps/app/ui/Button/index.tsx b/apps/plane/ui/Button/index.tsx similarity index 100% rename from apps/app/ui/Button/index.tsx rename to apps/plane/ui/Button/index.tsx diff --git a/apps/app/ui/CustomListbox/index.tsx b/apps/plane/ui/CustomListbox/index.tsx similarity index 100% rename from apps/app/ui/CustomListbox/index.tsx rename to apps/plane/ui/CustomListbox/index.tsx diff --git a/apps/app/ui/CustomListbox/types.d.ts b/apps/plane/ui/CustomListbox/types.d.ts similarity index 100% rename from apps/app/ui/CustomListbox/types.d.ts rename to apps/plane/ui/CustomListbox/types.d.ts diff --git a/apps/app/ui/EmptySpace/index.tsx b/apps/plane/ui/EmptySpace/index.tsx similarity index 100% rename from apps/app/ui/EmptySpace/index.tsx rename to apps/plane/ui/EmptySpace/index.tsx diff --git a/apps/app/ui/HeaderButton/index.tsx b/apps/plane/ui/HeaderButton/index.tsx similarity index 100% rename from apps/app/ui/HeaderButton/index.tsx rename to apps/plane/ui/HeaderButton/index.tsx diff --git a/apps/app/ui/Input/index.tsx b/apps/plane/ui/Input/index.tsx similarity index 100% rename from apps/app/ui/Input/index.tsx rename to apps/plane/ui/Input/index.tsx diff --git a/apps/app/ui/Input/types.d.ts b/apps/plane/ui/Input/types.d.ts similarity index 100% rename from apps/app/ui/Input/types.d.ts rename to apps/plane/ui/Input/types.d.ts diff --git a/apps/app/ui/Modal/index.tsx b/apps/plane/ui/Modal/index.tsx similarity index 100% rename from apps/app/ui/Modal/index.tsx rename to apps/plane/ui/Modal/index.tsx diff --git a/apps/app/ui/SearchListbox/index.tsx b/apps/plane/ui/SearchListbox/index.tsx similarity index 100% rename from apps/app/ui/SearchListbox/index.tsx rename to apps/plane/ui/SearchListbox/index.tsx diff --git a/apps/app/ui/SearchListbox/types.d.ts b/apps/plane/ui/SearchListbox/types.d.ts similarity index 100% rename from apps/app/ui/SearchListbox/types.d.ts rename to apps/plane/ui/SearchListbox/types.d.ts diff --git a/apps/app/ui/Select/index.tsx b/apps/plane/ui/Select/index.tsx similarity index 100% rename from apps/app/ui/Select/index.tsx rename to apps/plane/ui/Select/index.tsx diff --git a/apps/app/ui/Select/types.d.ts b/apps/plane/ui/Select/types.d.ts similarity index 100% rename from apps/app/ui/Select/types.d.ts rename to apps/plane/ui/Select/types.d.ts diff --git a/apps/app/ui/Spinner/index.tsx b/apps/plane/ui/Spinner/index.tsx similarity index 100% rename from apps/app/ui/Spinner/index.tsx rename to apps/plane/ui/Spinner/index.tsx diff --git a/apps/app/ui/TextArea/index.tsx b/apps/plane/ui/TextArea/index.tsx similarity index 100% rename from apps/app/ui/TextArea/index.tsx rename to apps/plane/ui/TextArea/index.tsx diff --git a/apps/app/ui/TextArea/types.d.ts b/apps/plane/ui/TextArea/types.d.ts similarity index 100% rename from apps/app/ui/TextArea/types.d.ts rename to apps/plane/ui/TextArea/types.d.ts diff --git a/apps/app/ui/Tooltip/index.tsx b/apps/plane/ui/Tooltip/index.tsx similarity index 100% rename from apps/app/ui/Tooltip/index.tsx rename to apps/plane/ui/Tooltip/index.tsx diff --git a/apps/app/ui/index.ts b/apps/plane/ui/index.ts similarity index 100% rename from apps/app/ui/index.ts rename to apps/plane/ui/index.ts diff --git a/apps/app/yarn.lock b/apps/plane/yarn.lock similarity index 100% rename from apps/app/yarn.lock rename to apps/plane/yarn.lock diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 000000000..a36487cb5 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,54 @@ +version: "3" + +services: + db: + image: postgres:12-alpine + restart: on-failure + volumes: + - postgres-data:/var/lib/postgresql/data + environment: + POSTGRES_USER: plane + POSTGRES_DB: plane + POSTGRES_PASSWORD: plane + command: postgres -c 'max_connections=1000' + redis: + image: redis:6.2.7-alpine + restart: on-failure + command: redis-server --maxmemory-policy allkeys-lru --maxmemory 200mb + plane_web: + container_name: plane_web + build: + context: . + dockerfile: ./apps/plane/Dockerfile + restart: always + ports: + - 3000:3000 + networks: + - app_network + + plane_api: + container_name: plane_api + build: + context: ./apiserver + dockerfile: Dockerfile + restart: always + ports: + - 8000:8000 + environment: + SENTRY_DSN: $SENTRY_DSN + WEB_URL: $WEB_URL + DATABASE_URL: postgres://plane:plane@db/plane + REDIS_URL: redis://redis + SECRET_KEY: $SECRET_KEY + networks: + - app_network + depends_on: + - db + - redis + command: python manage.py migrate && gunicorn plane.wsgi -k gthread --workers 8 --bind 0.0.0.0:8000 --config gunicorn.config.py --max-requests 10000 --max-requests-jitter 1000 --access-logfile - +networks: + app_network: + external: true + +volumes: + postgres-data: