Skip to content

Commit

Permalink
Merge pull request #2157 from makeplane/stage-release
Browse files Browse the repository at this point in the history
release: self hosting fixes
  • Loading branch information
sriramveeraghanta authored Sep 12, 2023
2 parents cc63f67 + 14fe545 commit 2bc05cc
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 9 deletions.
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ NEXT_PUBLIC_SLACK_CLIENT_ID=""
NEXT_PUBLIC_PLAUSIBLE_DOMAIN=""
# public boards deploy url
NEXT_PUBLIC_DEPLOY_URL=""
# plane deploy using nginx
NEXT_PUBLIC_DEPLOY_WITH_NGINX=1

# Backend
# Debug value for api server use it as 0 for production use
Expand Down
2 changes: 1 addition & 1 deletion replace-env-vars.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ fi
# Only perform action if $FROM and $TO are different.
echo "Replacing all statically built instances of $FROM with this string $TO ."

grep -R -la "${FROM}" apps/$DIRECTORY/.next | xargs -I{} sed -i "s|$FROM|$TO|g" "{}"
grep -R -la "${FROM}" $DIRECTORY/.next | xargs -I{} sed -i "s|$FROM|$TO|g" "{}"
2 changes: 2 additions & 0 deletions space/additional.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// additional.d.ts
/// <reference types="next-images" />
4 changes: 2 additions & 2 deletions space/components/accounts/sign-in.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import useToast from "hooks/use-toast";
// components
import { EmailPasswordForm, GithubLoginButton, GoogleLoginButton, EmailCodeForm } from "components/accounts";
// images
import BluePlaneLogoWithoutText from "public/plane-logos/blue-without-text.png";
const imagePrefix = process.env.NEXT_PUBLIC_DEPLOY_WITH_NGINX ? "/spaces/" : "";

export const SignInView = observer(() => {
const { user: userStore } = useMobxStore();
Expand Down Expand Up @@ -112,7 +112,7 @@ export const SignInView = observer(() => {
<div className="fixed grid place-items-center bg-custom-background-100 sm:py-5 top-11 sm:top-12 left-7 sm:left-16 lg:left-28">
<div className="grid place-items-center bg-custom-background-100">
<div className="h-[30px] w-[30px]">
<Image src={BluePlaneLogoWithoutText} alt="Plane Logo" />
<img src={`${imagePrefix}/plane-logos/blue-without-text.png`} alt="Plane Logo" />
</div>
</div>
</div>
Expand Down
5 changes: 4 additions & 1 deletion space/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ const nextConfig = {
};

if (parseInt(process.env.NEXT_PUBLIC_DEPLOY_WITH_NGINX || "0")) {
const nextConfigWithNginx = withImages({ basePath: "/spaces", ...nextConfig });
const nextConfigWithNginx = withImages({
basePath: "/spaces",
...nextConfig,
});
module.exports = nextConfigWithNginx;
} else {
module.exports = nextConfig;
Expand Down
1 change: 1 addition & 0 deletions space/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
"@types/react": "18.0.28",
"@types/react-dom": "18.0.11",
"@types/uuid": "^9.0.1",
"@typescript-eslint/eslint-plugin": "^5.48.2",
"autoprefixer": "^10.4.13",
"eslint": "8.34.0",
"eslint-config-custom": "*",
Expand Down
7 changes: 3 additions & 4 deletions space/pages/onboarding/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import React, { useEffect } from "react";
import Image from "next/image";
// assets
import BluePlaneLogoWithoutText from "public/plane-logos/blue-without-text.png";
// mobx
import { observer } from "mobx-react-lite";
import { useMobxStore } from "lib/mobx/store-provider";
Expand All @@ -12,6 +9,8 @@ import useToast from "hooks/use-toast";
// components
import { OnBoardingForm } from "components/accounts/onboarding-form";

const imagePrefix = process.env.NEXT_PUBLIC_DEPLOY_WITH_NGINX ? "/spaces/" : "";

const OnBoardingPage = () => {
const { user: userStore } = useMobxStore();

Expand All @@ -34,7 +33,7 @@ const OnBoardingPage = () => {
<div className="absolute border-b-[0.5px] sm:border-r-[0.5px] border-custom-border-200 h-[0.5px] w-full top-1/2 left-0 -translate-y-1/2 sm:h-screen sm:w-[0.5px] sm:top-0 sm:left-1/2 md:left-1/3 sm:-translate-x-1/2 sm:translate-y-0 z-10" />
<div className="absolute grid place-items-center bg-custom-background-100 px-3 sm:px-0 py-5 left-2 sm:left-1/2 md:left-1/3 sm:-translate-x-1/2 top-1/2 -translate-y-1/2 sm:translate-y-0 sm:top-12 z-10">
<div className="h-[30px] w-[30px]">
<Image src={BluePlaneLogoWithoutText} alt="Plane logo" />
<img src={`${imagePrefix}/plane-logos/blue-without-text.png`} alt="Plane logo" />
</div>
</div>
<div className="absolute sm:fixed text-custom-text-100 text-sm font-medium right-4 top-1/4 sm:top-12 -translate-y-1/2 sm:translate-y-0 sm:right-16 sm:py-5">
Expand Down
2 changes: 1 addition & 1 deletion space/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extends": "tsconfig/nextjs.json",
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", "additional.d.ts"],
"exclude": ["node_modules"],
"compilerOptions": {
"baseUrl": ".",
Expand Down

2 comments on commit 2bc05cc

@vercel
Copy link

@vercel vercel bot commented on 2bc05cc Sep 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

plane – ./web/

plane-plane.vercel.app
plane-git-master-plane.vercel.app
plane-theta.vercel.app
app.plane.so

@vercel
Copy link

@vercel vercel bot commented on 2bc05cc Sep 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

plane-sh – ./space/

plane.sh
plane-sh-plane.vercel.app
plane-sh-git-master-plane.vercel.app
plane-deploy.vercel.app

Please sign in to comment.