diff --git a/apps/app/.env.example b/.env.example similarity index 66% rename from apps/app/.env.example rename to .env.example index 9e41ba88d..118a94883 100644 --- a/apps/app/.env.example +++ b/.env.example @@ -1,5 +1,4 @@ # Replace with your instance Public IP -# NEXT_PUBLIC_API_BASE_URL = "http://localhost" NEXT_PUBLIC_EXTRA_IMAGE_DOMAINS= NEXT_PUBLIC_GOOGLE_CLIENTID="" NEXT_PUBLIC_GITHUB_APP_NAME="" @@ -10,3 +9,12 @@ NEXT_PUBLIC_ENABLE_SENTRY=0 NEXT_PUBLIC_ENABLE_SESSION_RECORDER=0 NEXT_PUBLIC_TRACK_EVENTS=0 NEXT_PUBLIC_SLACK_CLIENT_ID="" +EMAIL_HOST="" +EMAIL_HOST_USER="" +EMAIL_HOST_PASSWORD="" +AWS_REGION="" +AWS_ACCESS_KEY_ID="" +AWS_SECRET_ACCESS_KEY="" +AWS_S3_BUCKET_NAME="" +OPENAI_API_KEY="" +GPT_ENGINE="" \ No newline at end of file diff --git a/.github/workflows/push-image-backend.yml b/.github/workflows/push-image-backend.yml index abb833922..95d93f813 100644 --- a/.github/workflows/push-image-backend.yml +++ b/.github/workflows/push-image-backend.yml @@ -1,4 +1,4 @@ -name: Build Api Server Docker Image +name: Build and Push Backend Docker Image on: push: @@ -10,11 +10,8 @@ on: jobs: build_push_backend: - name: Build Api Server Docker Image + name: Build and Push Api Server Docker Image runs-on: ubuntu-20.04 - permissions: - contents: read - packages: write steps: - name: Check out the repo @@ -28,20 +25,33 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2.5.0 - - name: Login to Github Container Registry + - name: Login to GitHub Container Registry uses: docker/login-action@v2.1.0 with: registry: "ghcr.io" username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Extract metadata (tags, labels) for Docker - id: meta + - name: Login to Docker Hub + uses: docker/login-action@v2.1.0 + with: + registry: "registry.hub.docker.com" + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_PASSWORD }} + + - name: Extract metadata (tags, labels) for Docker (Docker Hub) + id: ghmeta + uses: docker/metadata-action@v4.3.0 + with: + images: makeplane/plane-backend + + - name: Extract metadata (tags, labels) for Docker (Github) + id: dkrmeta uses: docker/metadata-action@v4.3.0 with: images: ghcr.io/${{ github.repository }}-backend - - name: Build Api Server + - name: Build and Push to GitHub Container Registry uses: docker/build-push-action@v4.0.0 with: context: ./apiserver @@ -50,5 +60,18 @@ jobs: push: true cache-from: type=gha cache-to: type=gha - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} + tags: ${{ steps.ghmeta.outputs.tags }} + labels: ${{ steps.ghmeta.outputs.labels }} + + - name: Build and Push to Docker Hub + uses: docker/build-push-action@v4.0.0 + with: + context: ./apiserver + file: ./apiserver/Dockerfile.api + platforms: linux/arm64,linux/amd64 + push: true + cache-from: type=gha + cache-to: type=gha + tags: ${{ steps.dkrmeta.outputs.tags }} + labels: ${{ steps.dkrmeta.outputs.labels }} + diff --git a/.github/workflows/push-image-frontend.yml b/.github/workflows/push-image-frontend.yml index c6a3bf1b8..cbd742511 100644 --- a/.github/workflows/push-image-frontend.yml +++ b/.github/workflows/push-image-frontend.yml @@ -1,4 +1,4 @@ -name: Build Frontend Docker Image +name: Build and Push Frontend Docker Image on: push: @@ -12,9 +12,6 @@ jobs: build_push_frontend: name: Build Frontend Docker Image runs-on: ubuntu-20.04 - permissions: - contents: read - packages: write steps: - name: Check out the repo @@ -35,13 +32,26 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Extract metadata (tags, labels) for Docker + - name: Login to Docker Hub + uses: docker/login-action@v2.1.0 + with: + registry: "registry.hub.docker.com" + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_PASSWORD }} + + - name: Extract metadata (tags, labels) for Docker (Docker Hub) + id: ghmeta + uses: docker/metadata-action@v4.3.0 + with: + images: makeplane/plane-frontend + + - name: Extract metadata (tags, labels) for Docker (Github) id: meta uses: docker/metadata-action@v4.3.0 with: images: ghcr.io/${{ github.repository }}-frontend - - name: Build Frontend Server + - name: Build and Push to GitHub Container Registry uses: docker/build-push-action@v4.0.0 with: context: . @@ -50,5 +60,18 @@ jobs: push: true cache-from: type=gha cache-to: type=gha - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} + tags: ${{ steps.ghmeta.outputs.tags }} + labels: ${{ steps.ghmeta.outputs.labels }} + + - name: Build and Push to Docker Container Registry + uses: docker/build-push-action@v4.0.0 + with: + context: . + file: ./apps/app/Dockerfile.web + platforms: linux/arm64,linux/amd64 + push: true + cache-from: type=gha + cache-to: type=gha + tags: ${{ steps.dkrmeta.outputs.tags }} + labels: ${{ steps.dkrmeta.outputs.labels }} + diff --git a/Dockerfile b/Dockerfile index 094d628e3..cb7ef6887 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,6 +3,7 @@ RUN apk add --no-cache libc6-compat RUN apk update # Set working directory WORKDIR /app +ENV NEXT_PUBLIC_API_BASE_URL=http://NEXT_PUBLIC_API_BASE_URL_PLACEHOLDER RUN yarn global add turbo COPY . . @@ -16,7 +17,7 @@ FROM node:18-alpine AS installer RUN apk add --no-cache libc6-compat RUN apk update WORKDIR /app - +ARG NEXT_PUBLIC_API_BASE_URL=http://localhost:8000 # First install the dependencies (as they change less often) COPY .gitignore .gitignore COPY --from=builder /app/out/json/ . @@ -26,9 +27,16 @@ RUN yarn install # Build the project COPY --from=builder /app/out/full/ . COPY turbo.json turbo.json +COPY replace-env-vars.sh /usr/local/bin/ +USER root +RUN chmod +x /usr/local/bin/replace-env-vars.sh RUN yarn turbo run build --filter=app +ENV NEXT_PUBLIC_API_BASE_URL=$NEXT_PUBLIC_API_BASE_URL \ + BUILT_NEXT_PUBLIC_API_BASE_URL=$NEXT_PUBLIC_API_BASE_URL + +RUN /usr/local/bin/replace-env-vars.sh http://NEXT_PUBLIC_WEBAPP_URL_PLACEHOLDER ${NEXT_PUBLIC_API_BASE_URL} FROM python:3.11.1-alpine3.17 AS backend @@ -108,6 +116,16 @@ COPY nginx/nginx-single-docker-image.conf /etc/nginx/http.d/default.conf COPY nginx/supervisor.conf /code/supervisor.conf +ARG NEXT_PUBLIC_API_BASE_URL=http://localhost:8000 +ENV NEXT_PUBLIC_API_BASE_URL=$NEXT_PUBLIC_API_BASE_URL \ + BUILT_NEXT_PUBLIC_API_BASE_URL=$NEXT_PUBLIC_API_BASE_URL + +USER root +COPY replace-env-vars.sh /usr/local/bin/ +COPY start.sh /usr/local/bin/ +RUN chmod +x /usr/local/bin/replace-env-vars.sh +RUN chmod +x /usr/local/bin/start.sh + CMD ["supervisord","-c","/code/supervisor.conf"] diff --git a/README.md b/README.md index 102739e4e..827a2b146 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@
-Meet Plane. An open-source software development tool to manage issues, sprints, and product roadmaps with peace of mind 🧘♀️. +Meet [Plane](https://plane.so). An open-source software development tool to manage issues, sprints, and product roadmaps with peace of mind 🧘♀️. > Plane is still in its early days, not everything will be perfect yet, and hiccups may happen. Please let us know of any suggestions, ideas, or bugs that you encounter on our [Discord](https://discord.com/invite/A92xrEGCge) or GitHub issues, and we will use your feedback to improve on our upcoming releases. @@ -58,11 +58,18 @@ cd plane > If running in a cloud env replace localhost with public facing IP address of the VM +- Export Environment Variables + +```bash +set -a +source .env +set +a +``` - Run Docker compose up ```bash -docker-compose up +docker-compose -f docker-compose-hub.yml up ``` You can use the default email and password for your first login `captain@plane.so` and `password123`. @@ -128,7 +135,7 @@ To see how to Contribute, visit [here](https://github.com/makeplane/plane/blob/m The Plane community can be found on GitHub Discussions, where you can ask questions, voice ideas, and share your projects. -To chat with other community members you can join the [Plane Discord](https://discord.com/invite/q9HKAdau). +To chat with other community members you can join the [Plane Discord](https://discord.com/invite/A92xrEGCge). Our [Code of Conduct](https://github.com/makeplane/plane/blob/master/CODE_OF_CONDUCT.md) applies to all Plane community channels. diff --git a/apiserver/.env.example b/apiserver/.env.example deleted file mode 100644 index 8a7c76ffa..000000000 --- a/apiserver/.env.example +++ /dev/null @@ -1,28 +0,0 @@ -DJANGO_SETTINGS_MODULE="plane.settings.production" -# Database -DATABASE_URL=postgres://plane:xyzzyspoon@db:5432/plane -# Cache -REDIS_URL=redis://redis:6379/ -# SMTP -EMAIL_HOST="" -EMAIL_HOST_USER="" -EMAIL_HOST_PASSWORD="" -EMAIL_PORT="587" -EMAIL_USE_TLS="1" -EMAIL_FROM="Team Plane
-
|
-
No matching issues found. Try changing the parameters.
+There was some error in fetching the data.
++ {ANALYTICS_X_AXIS_VALUES.find((v) => v.value === params.x_axis)?.label} + | + {params.segment ? ( + barGraphData.xAxisKeys.map((key) => ( +
+
+ {params.segment === "priority" ? (
+ getPriorityIcon(key)
+ ) : (
+
+ )}
+ {DATE_KEYS.includes(params.segment ?? "")
+ ? renderMonthAndYear(key)
+ : params.segment === "assignees__email"
+ ? renderAssigneeName(key)
+ : key}
+
+ |
+ ))
+ ) : (
+ + {ANALYTICS_Y_AXIS_VALUES.find((v) => v.value === params.y_axis)?.label} + | + )} +
---|---|---|
+ {params.x_axis === "priority" ? ( + getPriorityIcon(`${item.name}`) + ) : ( + + )} + {params.x_axis === "assignees__email" + ? renderAssigneeName(`${item.name}`) + : addSpaceIfCamelCase(`${item.name}`)} + | + {params.segment ? ( + barGraphData.xAxisKeys.map((key, index) => ( ++ {item[key] ?? 0} + | + )) + ) : ( +{item[yAxisKey]} | + )} +
{percentage}%
++ Estimate Demand: +
+ ++ {defaultAnalytics.open_estimate_sum}/{defaultAnalytics.total_estimate_sum} +
+There was some error in fetching the data.
+diff --git a/apps/app/components/command-palette/command-pallette.tsx b/apps/app/components/command-palette/command-pallette.tsx index 9d23d84e2..bed84f5ad 100644 --- a/apps/app/components/command-palette/command-pallette.tsx +++ b/apps/app/components/command-palette/command-pallette.tsx @@ -821,7 +821,7 @@ export const CommandPalette: React.FC = () => { >
${content}
`); + }, [htmlContent, editorRef, content]); + return (