Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 18 additions & 19 deletions nginx/nginx.conf.template
Original file line number Diff line number Diff line change
@@ -1,30 +1,29 @@
events { }


http {
sendfile on;
sendfile on;

server {
listen 80;
root /www/data/;
access_log /var/log/nginx/access.log;
server {
listen 80;
root /www/data/;
access_log /var/log/nginx/access.log;

client_max_body_size ${FILE_SIZE_LIMIT};
client_max_body_size ${FILE_SIZE_LIMIT};

location / {
proxy_pass http://planefrontend:3000/;
}
location / {
proxy_pass http://planefrontend:3000/;
}

location /api/ {
proxy_pass http://planebackend:8000/api/;
}
location /api/ {
proxy_pass http://planebackend:8000/api/;
}

location /spaces/ {
proxy_pass http://planedeploy:3000/spaces/;
}
location /spaces/ {
proxy_pass http://planedeploy:3000/spaces/;
}

location /${BUCKET_NAME}/ {
proxy_pass http://plane-minio:9000/uploads/;
location /${BUCKET_NAME}/ {
proxy_pass http://plane-minio:9000/uploads/;
}
}
}
}
4 changes: 1 addition & 3 deletions space/.env.example
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Public boards deploy URL
NEXT_PUBLIC_DEPLOY_URL=""
# Google Client ID for Google OAuth
NEXT_PUBLIC_GOOGLE_CLIENTID=""
# Flag to toggle OAuth
NEXT_PUBLIC_ENABLE_OAUTH=1
NEXT_PUBLIC_ENABLE_OAUTH=0
4 changes: 2 additions & 2 deletions space/components/accounts/sign-in.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from "react";
import React, { useEffect } from "react";

import Image from "next/image";
import { useRouter } from "next/router";
Expand All @@ -13,7 +13,7 @@ import useToast from "hooks/use-toast";
// components
import { EmailPasswordForm, GithubLoginButton, GoogleLoginButton, EmailCodeForm } from "components/accounts";
// images
const imagePrefix = process.env.NEXT_PUBLIC_DEPLOY_WITH_NGINX ? "/spaces" : "";
const imagePrefix = Boolean(parseInt(process.env.NEXT_PUBLIC_DEPLOY_WITH_NGINX || "0")) ? "/spaces" : "";

export const SignInView = observer(() => {
const { user: userStore } = useMobxStore();
Expand Down
3 changes: 1 addition & 2 deletions space/helpers/common.helper.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
export const API_BASE_URL =
process.env.NEXT_PUBLIC_API_BASE_URL !== undefined ? process.env.NEXT_PUBLIC_API_BASE_URL : "http://localhost:8000";
export const API_BASE_URL = process.env.NEXT_PUBLIC_API_BASE_URL ? process.env.NEXT_PUBLIC_API_BASE_URL : "";
2 changes: 1 addition & 1 deletion space/pages/onboarding/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useMobxStore } from "lib/mobx/store-provider";
// components
import { OnBoardingForm } from "components/accounts/onboarding-form";

const imagePrefix = process.env.NEXT_PUBLIC_DEPLOY_WITH_NGINX ? "/spaces" : "";
const imagePrefix = Boolean(parseInt(process.env.NEXT_PUBLIC_DEPLOY_WITH_NGINX || "0")) ? "/spaces" : "";

const OnBoardingPage = () => {
const { user: userStore } = useMobxStore();
Expand Down
7 changes: 3 additions & 4 deletions web/helpers/common.helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ export const debounce = (func: any, wait: number, immediate: boolean = false) =>
};
};

export const API_BASE_URL =
process.env.NEXT_PUBLIC_API_BASE_URL !== undefined
? process.env.NEXT_PUBLIC_API_BASE_URL
: "http://localhost:8000";
export const API_BASE_URL = process.env.NEXT_PUBLIC_API_BASE_URL
? process.env.NEXT_PUBLIC_API_BASE_URL
: "";
2 changes: 1 addition & 1 deletion web/services/modules.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import APIService from "services/api.service";
import trackEventServices from "./track-event.service";
// types
import type { IIssueViewOptions, IModule, IIssue, ICurrentUserResponse } from "types";
import type { IModule, IIssue, ICurrentUserResponse } from "types";
import { API_BASE_URL } from "helpers/common.helper";

const { NEXT_PUBLIC_API_BASE_URL } = process.env;
Expand Down