feat: move to nginx, remove inter fonts
This commit is contained in:
parent
0ff50a0565
commit
995babb426
|
|
@ -1,21 +1,21 @@
|
|||
FROM node:20-alpine3.19
|
||||
ARG NEXT_PUBLIC_VERSION
|
||||
ENV NEXT_PUBLIC_VERSION=$NEXT_PUBLIC_VERSION
|
||||
RUN apk add --no-cache g++ make py3-pip supervisor bash caddy
|
||||
RUN apk add --no-cache g++ make py3-pip bash nginx
|
||||
RUN adduser -D -g 'www' www
|
||||
RUN mkdir /www
|
||||
RUN chown -R www:www /var/lib/nginx
|
||||
RUN chown -R www:www /www
|
||||
|
||||
|
||||
RUN npm --no-update-notifier --no-fund --global install pnpm@10.6.1 pm2
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY . /app
|
||||
COPY var/docker/supervisord.conf /etc/supervisord.conf
|
||||
COPY var/docker/Caddyfile /app/Caddyfile
|
||||
COPY var/docker/entrypoint.sh /app/entrypoint.sh
|
||||
COPY var/docker/supervisord/caddy.conf /etc/supervisor.d/caddy.conf
|
||||
RUN chmod +x /app/entrypoint.sh
|
||||
COPY var/docker/nginx.conf /etc/nginx/nginx.conf
|
||||
|
||||
RUN pnpm install
|
||||
RUN pnpm run build
|
||||
RUN NODE_OPTIONS="--max-old-space-size=4096" pnpm run build
|
||||
|
||||
EXPOSE 4200
|
||||
|
||||
CMD ["pnpm", "run", "pm2"]
|
||||
CMD ["sh", "-c", "nginx && pnpm run pm2"]
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ export class AuthService {
|
|||
private _emailService: EmailService
|
||||
) {}
|
||||
async canRegister(provider: string) {
|
||||
if (!process.env.DISABLE_REGISTRATION || provider === Provider.GENERIC) {
|
||||
if (!(process.env.DISABLE_REGISTRATION && process.env.DISABLE_REGISTRATION !== 'false') || provider === Provider.GENERIC) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import { ReactNode } from 'react';
|
||||
import { PreviewWrapper } from '@gitroom/frontend/components/preview/preview.wrapper';
|
||||
|
||||
export default async function AppLayout({ children }: { children: ReactNode }) {
|
||||
return (
|
||||
<div className="bg-[#000000] min-h-screen">
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ export const metadata: Metadata = {
|
|||
};
|
||||
export default async function Auth(params: {searchParams: {provider: string}}) {
|
||||
const t = await getT();
|
||||
if (process.env.DISABLE_REGISTRATION) {
|
||||
if (process.env.DISABLE_REGISTRATION && process.env.DISABLE_REGISTRATION !== 'false') {
|
||||
const canRegister = (
|
||||
await (await internalFetch('/auth/can-register')).json()
|
||||
).register;
|
||||
|
|
|
|||
|
|
@ -1,11 +1,10 @@
|
|||
import interClass from '@gitroom/react/helpers/inter.font';
|
||||
export const dynamic = 'force-dynamic';
|
||||
import '../global.scss';
|
||||
import 'react-tooltip/dist/react-tooltip.css';
|
||||
import '@copilotkit/react-ui/styles.css';
|
||||
import LayoutContext from '@gitroom/frontend/components/layout/layout.context';
|
||||
import { ReactNode } from 'react';
|
||||
import { Chakra_Petch } from 'next/font/google';
|
||||
import { Plus_Jakarta_Sans } from 'next/font/google';
|
||||
import PlausibleProvider from 'next-plausible';
|
||||
import clsx from 'clsx';
|
||||
import { VariableContextComponent } from '@gitroom/react/helpers/variable.context';
|
||||
|
|
@ -18,21 +17,23 @@ import { headers } from 'next/headers';
|
|||
import { headerName } from '@gitroom/react/translation/i18n.config';
|
||||
import { HtmlComponent } from '@gitroom/frontend/components/layout/html.component';
|
||||
|
||||
const chakra = Chakra_Petch({
|
||||
weight: '400',
|
||||
const jakartaSans = Plus_Jakarta_Sans({
|
||||
weight: ['600', '500'],
|
||||
style: ['normal', 'italic'],
|
||||
subsets: ['latin'],
|
||||
});
|
||||
|
||||
export default async function AppLayout({ children }: { children: ReactNode }) {
|
||||
const allHeaders = headers();
|
||||
const Plausible = !!process.env.STRIPE_PUBLISHABLE_KEY
|
||||
? PlausibleProvider
|
||||
: Fragment;
|
||||
return (
|
||||
<html className={interClass}>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="icon" href="/favicon.ico" sizes="any" />
|
||||
</head>
|
||||
<body className={clsx(chakra.className, 'dark text-primary !bg-primary')}>
|
||||
<body className={clsx(jakartaSans.className, 'dark text-primary !bg-primary')}>
|
||||
<HtmlComponent />
|
||||
<VariableContextComponent
|
||||
storageProvider={
|
||||
|
|
|
|||
|
|
@ -1,27 +1,27 @@
|
|||
import interClass from '@gitroom/react/helpers/inter.font';
|
||||
export const dynamic = 'force-dynamic';
|
||||
import '../global.scss';
|
||||
import 'react-tooltip/dist/react-tooltip.css';
|
||||
import '@copilotkit/react-ui/styles.css';
|
||||
import LayoutContext from '@gitroom/frontend/components/layout/layout.context';
|
||||
import { ReactNode } from 'react';
|
||||
import { Chakra_Petch } from 'next/font/google';
|
||||
import PlausibleProvider from 'next-plausible';
|
||||
import { Plus_Jakarta_Sans } from 'next/font/google';
|
||||
import clsx from 'clsx';
|
||||
import { VariableContextComponent } from '@gitroom/react/helpers/variable.context';
|
||||
import { Fragment } from 'react';
|
||||
import UtmSaver from '@gitroom/helpers/utils/utm.saver';
|
||||
const chakra = Chakra_Petch({
|
||||
weight: '400',
|
||||
|
||||
const jakartaSans = Plus_Jakarta_Sans({
|
||||
weight: ['600', '500'],
|
||||
style: ['normal', 'italic'],
|
||||
subsets: ['latin'],
|
||||
});
|
||||
|
||||
export default async function AppLayout({ children }: { children: ReactNode }) {
|
||||
return (
|
||||
<html className={interClass}>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="icon" href="/favicon.ico" sizes="any" />
|
||||
</head>
|
||||
<body className={clsx(chakra.className, 'dark text-primary !bg-primary')}>
|
||||
<body className={clsx(jakartaSans.className, 'dark text-primary !bg-primary')}>
|
||||
<VariableContextComponent
|
||||
language="en"
|
||||
storageProvider={
|
||||
|
|
|
|||
|
|
@ -15,8 +15,8 @@ import useSWR from 'swr';
|
|||
import clsx from 'clsx';
|
||||
import { useFetch } from '@gitroom/helpers/utils/custom.fetch';
|
||||
import ReactLoading from 'react-loading';
|
||||
import interClass from '@gitroom/react/helpers/inter.font';
|
||||
import { useT } from '@gitroom/react/translation/get.transation.service.client';
|
||||
|
||||
export const UpDown: FC<{
|
||||
name: string;
|
||||
param: string;
|
||||
|
|
@ -201,7 +201,7 @@ export const StarsTableComponent = () => {
|
|||
</div>
|
||||
<div className="flex-1 bg-secondary">
|
||||
{stars?.stars?.length ? (
|
||||
<table className={`table1 ${interClass}`}>
|
||||
<table className={`table1`}>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ import { classValidatorResolver } from '@hookform/resolvers/class-validator';
|
|||
import { LoginUserDto } from '@gitroom/nestjs-libraries/dtos/auth/login.user.dto';
|
||||
import { GithubProvider } from '@gitroom/frontend/components/auth/providers/github.provider';
|
||||
import { OauthProvider } from '@gitroom/frontend/components/auth/providers/oauth.provider';
|
||||
import interClass from '@gitroom/react/helpers/inter.font';
|
||||
import { GoogleProvider } from '@gitroom/frontend/components/auth/providers/google.provider';
|
||||
import { useVariables } from '@gitroom/react/helpers/variable.context';
|
||||
import { FarcasterProvider } from '@gitroom/frontend/components/auth/providers/farcaster.provider';
|
||||
|
|
@ -76,7 +75,7 @@ export function Login() {
|
|||
<div className="h-[20px] mb-[24px] mt-[24px] relative">
|
||||
<div className="absolute w-full h-[1px] bg-fifth top-[50%] -translate-y-[50%]" />
|
||||
<div
|
||||
className={`absolute z-[1] ${interClass} justify-center items-center w-full start-0 top-0 flex`}
|
||||
className={`absolute z-[1] justify-center items-center w-full start-0 top-0 flex`}
|
||||
>
|
||||
<div className="bg-customColor15 px-[16px]">{t('or', 'OR')}</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
'use client';
|
||||
|
||||
import { OauthProvider } from '@gitroom/frontend/components/auth/providers/oauth.provider';
|
||||
import interClass from '@gitroom/react/helpers/inter.font';
|
||||
import { useT } from '@gitroom/react/translation/get.transation.service.client';
|
||||
import { useVariables } from '@gitroom/react/helpers/variable.context';
|
||||
|
||||
|
|
@ -24,7 +23,7 @@ export const LoginWithOidc = () => {
|
|||
<div className="h-[20px] mb-[24px] mt-[24px] relative">
|
||||
<div className="absolute w-full h-[1px] bg-fifth top-[50%] -translate-y-[50%]" />
|
||||
<div
|
||||
className={`absolute z-[1] ${interClass} justify-center items-center w-full start-0 top-0 flex`}
|
||||
className={`absolute z-[1] justify-center items-center w-full start-0 top-0 flex`}
|
||||
/>
|
||||
</div>
|
||||
</>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
'use client';
|
||||
|
||||
import { FC, useCallback } from 'react';
|
||||
import interClass from '@gitroom/react/helpers/inter.font';
|
||||
import { useVariables } from '@gitroom/react/helpers/variable.context';
|
||||
import { NeynarContextProvider, Theme, useNeynarContext } from '@neynar/react';
|
||||
import { NeynarAuthButton } from '@gitroom/frontend/components/auth/nayner.auth.button';
|
||||
|
|
@ -27,7 +26,7 @@ export const ButtonCaster: FC<{
|
|||
>
|
||||
<NeynarAuthButton onLogin={login}>
|
||||
<div
|
||||
className={`cursor-pointer bg-[#855ECD] h-[44px] rounded-[4px] flex justify-center items-center text-white ${interClass} gap-[4px]`}
|
||||
className={`cursor-pointer bg-[#855ECD] h-[44px] rounded-[4px] flex justify-center items-center text-white gap-[4px]`}
|
||||
>
|
||||
<svg
|
||||
width="21px"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import { useCallback } from 'react';
|
||||
import { useFetch } from '@gitroom/helpers/utils/custom.fetch';
|
||||
import interClass from '@gitroom/react/helpers/inter.font';
|
||||
import { useT } from '@gitroom/react/translation/get.transation.service.client';
|
||||
export const GithubProvider = () => {
|
||||
const fetch = useFetch();
|
||||
|
|
@ -12,7 +11,7 @@ export const GithubProvider = () => {
|
|||
return (
|
||||
<div
|
||||
onClick={gotoLogin}
|
||||
className={`cursor-pointer bg-white h-[44px] rounded-[4px] flex justify-center items-center text-customColor16 ${interClass} gap-[4px]`}
|
||||
className={`cursor-pointer bg-white h-[44px] rounded-[4px] flex justify-center items-center text-customColor16 gap-[4px]`}
|
||||
>
|
||||
<div>
|
||||
<svg
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import { useCallback } from 'react';
|
||||
import { useFetch } from '@gitroom/helpers/utils/custom.fetch';
|
||||
import interClass from '@gitroom/react/helpers/inter.font';
|
||||
import { useT } from '@gitroom/react/translation/get.transation.service.client';
|
||||
export const GoogleProvider = () => {
|
||||
const fetch = useFetch();
|
||||
|
|
@ -12,7 +11,7 @@ export const GoogleProvider = () => {
|
|||
return (
|
||||
<div
|
||||
onClick={gotoLogin}
|
||||
className={`cursor-pointer bg-white h-[44px] rounded-[4px] flex justify-center items-center text-customColor16 ${interClass} gap-[4px]`}
|
||||
className={`cursor-pointer bg-white h-[44px] rounded-[4px] flex justify-center items-center text-customColor16 gap-[4px]`}
|
||||
>
|
||||
<div>
|
||||
<svg
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
import { useCallback } from 'react';
|
||||
import Image from 'next/image';
|
||||
import { useFetch } from '@gitroom/helpers/utils/custom.fetch';
|
||||
import interClass from '@gitroom/react/helpers/inter.font';
|
||||
import { useVariables } from '@gitroom/react/helpers/variable.context';
|
||||
import { useT } from '@gitroom/react/translation/get.transation.service.client';
|
||||
export const OauthProvider = () => {
|
||||
|
|
@ -27,7 +26,7 @@ export const OauthProvider = () => {
|
|||
return (
|
||||
<div
|
||||
onClick={gotoLogin}
|
||||
className={`cursor-pointer bg-white h-[44px] rounded-[4px] flex justify-center items-center text-customColor16 ${interClass} gap-[4px]`}
|
||||
className={`cursor-pointer bg-white h-[44px] rounded-[4px] flex justify-center items-center text-customColor16 gap-[4px]`}
|
||||
>
|
||||
<div>
|
||||
<Image
|
||||
|
|
|
|||
|
|
@ -1,12 +1,11 @@
|
|||
import { FC } from 'react';
|
||||
import interClass from '@gitroom/react/helpers/inter.font';
|
||||
import { useT } from '@gitroom/react/translation/get.transation.service.client';
|
||||
|
||||
export const WalletUiProvider: FC = () => {
|
||||
const t = useT();
|
||||
return (
|
||||
<div
|
||||
className={`cursor-pointer bg-[#0b2181] h-[44px] rounded-[4px] flex justify-center items-center text-white ${interClass} gap-[7px]`}
|
||||
className={`cursor-pointer bg-[#0b2181] h-[44px] rounded-[4px] flex justify-center items-center text-white gap-[7px]`}
|
||||
>
|
||||
<svg
|
||||
width="18"
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ import { CreateOrgUserDto } from '@gitroom/nestjs-libraries/dtos/auth/create.org
|
|||
import { GithubProvider } from '@gitroom/frontend/components/auth/providers/github.provider';
|
||||
import { useRouter, useSearchParams } from 'next/navigation';
|
||||
import { LoadingComponent } from '@gitroom/frontend/components/layout/loading';
|
||||
import interClass from '@gitroom/react/helpers/inter.font';
|
||||
import clsx from 'clsx';
|
||||
import { GoogleProvider } from '@gitroom/frontend/components/auth/providers/google.provider';
|
||||
import { OauthProvider } from '@gitroom/frontend/components/auth/providers/oauth.provider';
|
||||
|
|
@ -169,7 +168,7 @@ export function RegisterAfter({
|
|||
<div className="h-[20px] mb-[24px] mt-[24px] relative">
|
||||
<div className="absolute w-full h-[1px] bg-fifth top-[50%] -translate-y-[50%]" />
|
||||
<div
|
||||
className={`absolute z-[1] ${interClass} justify-center items-center w-full start-0 top-0 flex`}
|
||||
className={`absolute z-[1] justify-center items-center w-full start-0 top-0 flex`}
|
||||
>
|
||||
<div className="bg-customColor15 px-[16px]">{t('or', 'OR')}</div>
|
||||
</div>
|
||||
|
|
@ -201,7 +200,7 @@ export function RegisterAfter({
|
|||
placeholder="Company"
|
||||
/>
|
||||
</div>
|
||||
<div className={clsx('text-[12px]', interClass)}>
|
||||
<div className={clsx('text-[12px]')}>
|
||||
{t(
|
||||
'by_registering_you_agree_to_our',
|
||||
'By registering you agree to our'
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@ import { useToaster } from '@gitroom/react/toaster/toaster';
|
|||
import clsx from 'clsx';
|
||||
import { deleteDialog } from '@gitroom/react/helpers/delete.dialog';
|
||||
import { CopilotTextarea } from '@copilotkit/react-textarea';
|
||||
import interClass from '@gitroom/react/helpers/inter.font';
|
||||
import { Slider } from '@gitroom/react/form/slider';
|
||||
import { useT } from '@gitroom/react/translation/get.transation.service.client';
|
||||
export const Autopost: FC = () => {
|
||||
|
|
@ -367,7 +366,7 @@ export const AddOrEditWebhook: FC<{
|
|||
</Select>
|
||||
{!generateContent && (
|
||||
<>
|
||||
<div className={`${interClass} text-[14px] mb-[6px]`}>
|
||||
<div className={`text-[14px] mb-[6px]`}>
|
||||
{t('post_content', 'Post content')}
|
||||
</div>
|
||||
<CopilotTextarea
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
import { FC, useCallback, useState } from 'react';
|
||||
import clsx from 'clsx';
|
||||
import interClass from '@gitroom/react/helpers/inter.font';
|
||||
import { useVariables } from '@gitroom/react/helpers/variable.context';
|
||||
import { useUser } from '@gitroom/frontend/components/layout/user.context';
|
||||
import { useT } from '@gitroom/react/translation/get.transation.service.client';
|
||||
|
|
@ -74,7 +73,7 @@ export const FAQSection: FC<{
|
|||
onClick={changeShow}
|
||||
>
|
||||
<div
|
||||
className={`text-[20px] ${interClass} cursor-pointer flex justify-center`}
|
||||
className={`text-[20px] cursor-pointer flex justify-center`}
|
||||
>
|
||||
<div className="flex-1">{title}</div>
|
||||
<div className="flex items-center justify-center w-[32px]">
|
||||
|
|
@ -121,7 +120,7 @@ export const FAQSection: FC<{
|
|||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
}}
|
||||
className={`mt-[16px] w-full text-wrap ${interClass} font-[400] text-[16px] text-customColor17 select-text`}
|
||||
className={`mt-[16px] w-full text-wrap font-[400] text-[16px] text-customColor17 select-text`}
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: description,
|
||||
}}
|
||||
|
|
|
|||
|
|
@ -15,8 +15,7 @@ import { pricing } from '@gitroom/nestjs-libraries/database/prisma/subscriptions
|
|||
import { FAQComponent } from '@gitroom/frontend/components/billing/faq.component';
|
||||
import { useSWRConfig } from 'swr';
|
||||
import { useUser } from '@gitroom/frontend/components/layout/user.context';
|
||||
import interClass from '@gitroom/react/helpers/inter.font';
|
||||
import { useParams, useRouter, useSearchParams } from 'next/navigation';
|
||||
import { useRouter, useSearchParams } from 'next/navigation';
|
||||
import { useVariables } from '@gitroom/react/helpers/variable.context';
|
||||
import { useModals } from '@mantine/modals';
|
||||
import { TopTitle } from '@gitroom/frontend/components/launches/helpers/top.title.component';
|
||||
|
|
@ -29,19 +28,7 @@ import { TrackEnum } from '@gitroom/nestjs-libraries/user/track.enum';
|
|||
import { PurchaseCrypto } from '@gitroom/frontend/components/billing/purchase.crypto';
|
||||
import { useT } from '@gitroom/react/translation/get.transation.service.client';
|
||||
import { FinishTrial } from '@gitroom/frontend/components/billing/finish.trial';
|
||||
import { LogoutComponent } from '@gitroom/frontend/components/layout/logout.component';
|
||||
export interface Tiers {
|
||||
month: Array<{
|
||||
name: 'Pro' | 'Standard';
|
||||
recurring: 'month' | 'year';
|
||||
price: number;
|
||||
}>;
|
||||
year: Array<{
|
||||
name: 'Pro' | 'Standard';
|
||||
recurring: 'month' | 'year';
|
||||
price: number;
|
||||
}>;
|
||||
}
|
||||
|
||||
export const Prorate: FC<{
|
||||
period: 'MONTHLY' | 'YEARLY';
|
||||
pack: 'STANDARD' | 'PRO';
|
||||
|
|
@ -422,7 +409,7 @@ export const MainBillingComponent: FC<{
|
|||
? values.year_price
|
||||
: values.month_price}
|
||||
</div>
|
||||
<div className={`text-[14px] ${interClass} text-customColor18`}>
|
||||
<div className={`text-[14px] text-customColor18`}>
|
||||
{monthlyOrYearly === 'on' ? '/year' : '/month'}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ import { useUser } from '@gitroom/frontend/components/layout/user.context';
|
|||
import { Input } from '@gitroom/react/form/input';
|
||||
import { useFetch } from '@gitroom/helpers/utils/custom.fetch';
|
||||
import { deleteDialog } from '@gitroom/react/helpers/delete.dialog';
|
||||
import interClass from '@gitroom/react/helpers/inter.font';
|
||||
export const CommentBox: FC<{
|
||||
value?: string;
|
||||
type: 'textarea' | 'input';
|
||||
|
|
@ -303,7 +302,7 @@ export const CommentComponent: FC<{
|
|||
<div className="flex gap-[8px]">
|
||||
<div className="w-[40px] flex flex-col items-center">
|
||||
<div
|
||||
className={`rounded-full relative z-[2] text-blue-500 font-bold ${interClass} flex justify-center items-center w-[40px] h-[40px] bg-white border-tableBorder border`}
|
||||
className={`rounded-full relative z-[2] text-blue-500 font-bold flex justify-center items-center w-[40px] h-[40px] bg-white border-tableBorder border`}
|
||||
>
|
||||
{comment.user.email[0].toUpperCase()}
|
||||
</div>
|
||||
|
|
@ -331,7 +330,7 @@ export const CommentComponent: FC<{
|
|||
>
|
||||
<div className="w-[40px] flex flex-col items-center">
|
||||
<div
|
||||
className={`rounded-full relative z-[2] text-blue-500 font-bold ${interClass} flex justify-center items-center w-[40px] h-[40px] bg-white border-tableBorder border`}
|
||||
className={`rounded-full relative z-[2] text-blue-500 font-bold flex justify-center items-center w-[40px] h-[40px] bg-white border-tableBorder border`}
|
||||
>
|
||||
{childComment.user.email[0].toUpperCase()}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,14 +1,13 @@
|
|||
import { useIntegration } from '@gitroom/frontend/components/launches/helpers/use.integration';
|
||||
import { useMediaDirectory } from '@gitroom/react/helpers/use.media.directory';
|
||||
import { useFormatting } from '@gitroom/frontend/components/launches/helpers/use.formatting';
|
||||
import clsx from 'clsx';
|
||||
import { VideoOrImage } from '@gitroom/react/helpers/video.or.image';
|
||||
import { FC } from 'react';
|
||||
import { textSlicer } from '@gitroom/helpers/utils/count.length';
|
||||
import interClass from '@gitroom/react/helpers/inter.font';
|
||||
import Image from 'next/image';
|
||||
import { useLaunchStore } from '@gitroom/frontend/components/new-launch/store';
|
||||
import { stripHtmlValidation } from '@gitroom/helpers/utils/strip.html.validation';
|
||||
|
||||
export const GeneralPreviewComponent: FC<{
|
||||
maximumCharacters?: number;
|
||||
}> = (props) => {
|
||||
|
|
@ -113,8 +112,7 @@ export const GeneralPreviewComponent: FC<{
|
|||
<div
|
||||
className={clsx(
|
||||
'text-wrap whitespace-pre',
|
||||
'preview',
|
||||
interClass
|
||||
'preview'
|
||||
)}
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: value.text,
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ import { useClickOutside } from '@mantine/hooks';
|
|||
import { useFetch } from '@gitroom/helpers/utils/custom.fetch';
|
||||
import { deleteDialog } from '@gitroom/react/helpers/delete.dialog';
|
||||
import { useToaster } from '@gitroom/react/toaster/toaster';
|
||||
import interClass from '@gitroom/react/helpers/inter.font';
|
||||
import { useModals } from '@mantine/modals';
|
||||
import { TimeTable } from '@gitroom/frontend/components/launches/time.table';
|
||||
import {
|
||||
|
|
@ -302,7 +301,7 @@ export const Menu: FC<{
|
|||
{show && (
|
||||
<div
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
className={`absolute top-[100%] start-0 p-[12px] bg-newBgColorInner shadow-menu flex flex-col gap-[16px] z-[100] rounded-[8px] border border-tableBorder ${interClass} text-nowrap`}
|
||||
className={`absolute top-[100%] start-0 p-[12px] bg-newBgColorInner shadow-menu flex flex-col gap-[16px] z-[100] rounded-[8px] border border-tableBorder text-nowrap`}
|
||||
>
|
||||
{canDisable && !findIntegration?.refreshNeeded && (
|
||||
<div
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ import { useModals } from '@mantine/modals';
|
|||
import { useFetch } from '@gitroom/helpers/utils/custom.fetch';
|
||||
import { timer } from '@gitroom/helpers/utils/timer';
|
||||
import { makeId } from '@gitroom/nestjs-libraries/services/make.is';
|
||||
import interClass from '@gitroom/react/helpers/inter.font';
|
||||
import { Input } from '@gitroom/react/form/input';
|
||||
import { Button } from '@gitroom/react/form/button';
|
||||
import copy from 'copy-to-clipboard';
|
||||
|
|
@ -101,7 +100,7 @@ export const TelegramProvider: FC<Web3ProviderInterface> = (props) => {
|
|||
{!step ? (
|
||||
<div className="w-full mt-[16px]" onClick={loadAll}>
|
||||
<div
|
||||
className={`cursor-pointer bg-[#2EA6DD] h-[44px] rounded-[4px] flex justify-center items-center text-white ${interClass} gap-[4px]`}
|
||||
className={`cursor-pointer bg-[#2EA6DD] h-[44px] rounded-[4px] flex justify-center items-center text-white gap-[4px]`}
|
||||
>
|
||||
<svg
|
||||
width="51"
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ import React, {
|
|||
import { Checkbox } from '@gitroom/react/form/checkbox';
|
||||
import { useRouter, useSearchParams } from 'next/navigation';
|
||||
import clsx from 'clsx';
|
||||
import interClass from '@gitroom/react/helpers/inter.font';
|
||||
import { Button } from '@gitroom/react/form/button';
|
||||
import {
|
||||
allTagsOptions,
|
||||
|
|
@ -434,7 +433,6 @@ export const Card: FC<{
|
|||
<div
|
||||
className={clsx(
|
||||
'bg-customColor6 rounded-[34px] py-[8px] px-[12px] text-[12px]',
|
||||
interClass
|
||||
)}
|
||||
>
|
||||
{t('content_writer', 'Content Writer')}
|
||||
|
|
@ -444,7 +442,6 @@ export const Card: FC<{
|
|||
<div
|
||||
className={clsx(
|
||||
'bg-customColor6 rounded-[34px] py-[8px] px-[12px] text-[12px]',
|
||||
interClass
|
||||
)}
|
||||
>
|
||||
{t('influencer', 'Influencer')}
|
||||
|
|
@ -467,7 +464,6 @@ export const Card: FC<{
|
|||
<div
|
||||
className={clsx(
|
||||
'gap-[8px] flex items-center text-[10px] font-[300] text-customColor41 tracking-[1.2px] uppercase',
|
||||
interClass
|
||||
)}
|
||||
>
|
||||
{tags.map((tag, index) => (
|
||||
|
|
|
|||
|
|
@ -29,7 +29,6 @@ export interface Message {
|
|||
deletedAt: any;
|
||||
}
|
||||
import { Textarea } from '@gitroom/react/form/textarea';
|
||||
import interClass from '@gitroom/react/helpers/inter.font';
|
||||
import clsx from 'clsx';
|
||||
import useSWR from 'swr';
|
||||
import {
|
||||
|
|
@ -114,7 +113,6 @@ export const Message: FC<{
|
|||
<pre
|
||||
className={clsx(
|
||||
'whitespace-pre-line font-[400] text-[12px]',
|
||||
interClass
|
||||
)}
|
||||
>
|
||||
{message.content}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
import { FC, useCallback, useEffect, useState } from 'react';
|
||||
import { ReactTags } from 'react-tag-autocomplete';
|
||||
import interClass from '@gitroom/react/helpers/inter.font';
|
||||
import { useCustomProviderFunction } from '@gitroom/frontend/components/launches/helpers/use.custom.provider.function';
|
||||
import { useSettings } from '@gitroom/frontend/components/launches/helpers/use.values';
|
||||
export const DevtoTags: FC<{
|
||||
|
|
@ -52,7 +51,7 @@ export const DevtoTags: FC<{
|
|||
}
|
||||
return (
|
||||
<div>
|
||||
<div className={`${interClass} text-[14px] mb-[6px]`}>{label}</div>
|
||||
<div className={`text-[14px] mb-[6px]`}>{label}</div>
|
||||
<ReactTags
|
||||
suggestions={tags}
|
||||
selected={tagValue}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import { FC, useCallback, useEffect, useMemo, useState } from 'react';
|
|||
import { useCustomProviderFunction } from '@gitroom/frontend/components/launches/helpers/use.custom.provider.function';
|
||||
import { useSettings } from '@gitroom/frontend/components/launches/helpers/use.values';
|
||||
import { ReactTags } from 'react-tag-autocomplete';
|
||||
import interClass from '@gitroom/react/helpers/inter.font';
|
||||
|
||||
export const HashnodeTags: FC<{
|
||||
name: string;
|
||||
label: string;
|
||||
|
|
@ -65,7 +65,7 @@ export const HashnodeTags: FC<{
|
|||
}
|
||||
return (
|
||||
<div>
|
||||
<div className={`${interClass} text-[14px] mb-[6px]`}>{label}</div>
|
||||
<div className={`text-[14px] mb-[6px]`}>{label}</div>
|
||||
<ReactTags
|
||||
suggestions={tags}
|
||||
selected={tagValue}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
import { FC, useCallback, useEffect, useMemo, useState } from 'react';
|
||||
import { useSettings } from '@gitroom/frontend/components/launches/helpers/use.values';
|
||||
import { ReactTags } from 'react-tag-autocomplete';
|
||||
import interClass from '@gitroom/react/helpers/inter.font';
|
||||
import { useIntegration } from '@gitroom/frontend/components/launches/helpers/use.integration';
|
||||
import clsx from 'clsx';
|
||||
import { useT } from '@gitroom/react/translation/get.transation.service.client';
|
||||
|
|
@ -85,7 +84,7 @@ export const InstagramCollaboratorsTags: FC<{
|
|||
'opacity-50 pointer-events-none'
|
||||
)}
|
||||
>
|
||||
<div className={clsx(`${interClass} text-[14px] mb-[6px]`)}>
|
||||
<div className={clsx(`text-[14px] mb-[6px]`)}>
|
||||
{label}
|
||||
</div>
|
||||
<ReactTags
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
import { FC, useCallback, useEffect, useMemo, useState } from 'react';
|
||||
import { useSettings } from '@gitroom/frontend/components/launches/helpers/use.values';
|
||||
import { ReactTags } from 'react-tag-autocomplete';
|
||||
import interClass from '@gitroom/react/helpers/inter.font';
|
||||
import { useT } from '@gitroom/react/translation/get.transation.service.client';
|
||||
|
||||
export const MediumTags: FC<{
|
||||
|
|
@ -68,7 +67,7 @@ export const MediumTags: FC<{
|
|||
}, [suggestions, tagValue]);
|
||||
return (
|
||||
<div>
|
||||
<div className={`${interClass} text-[14px] mb-[6px]`}>{label}</div>
|
||||
<div className={`text-[14px] mb-[6px]`}>{label}</div>
|
||||
<ReactTags
|
||||
placeholderText={t('add_a_tag', 'Add a tag')}
|
||||
suggestions={suggestionsArray}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@ import {
|
|||
import clsx from 'clsx';
|
||||
import { useMediaDirectory } from '@gitroom/react/helpers/use.media.directory';
|
||||
import { deleteDialog } from '@gitroom/react/helpers/delete.dialog';
|
||||
import interClass from '@gitroom/react/helpers/inter.font';
|
||||
import Image from 'next/image';
|
||||
import { useT } from '@gitroom/react/translation/get.transation.service.client';
|
||||
import { useFormatting } from '@gitroom/frontend/components/launches/helpers/use.formatting';
|
||||
|
|
@ -96,7 +95,7 @@ const RedditPreview: FC = (props) => {
|
|||
<div
|
||||
key={index}
|
||||
className={clsx(
|
||||
`bg-customColor37 w-full p-[10px] flex flex-col ${interClass} border-tableBorder border`
|
||||
`bg-customColor37 w-full p-[10px] flex flex-col border-tableBorder border`
|
||||
)}
|
||||
>
|
||||
<div className="flex flex-col">
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
import React, { ReactNode, useCallback } from 'react';
|
||||
import { Logo } from '@gitroom/frontend/components/new-layout/logo';
|
||||
import { MenuItem } from '@gitroom/frontend/components/new-layout/menu-item';
|
||||
import { Plus_Jakarta_Sans } from 'next/font/google';
|
||||
const ModeComponent = dynamic(
|
||||
() => import('@gitroom/frontend/components/layout/mode.component'),
|
||||
|
|
@ -14,7 +13,6 @@ const ModeComponent = dynamic(
|
|||
import clsx from 'clsx';
|
||||
import dynamic from 'next/dynamic';
|
||||
import { useFetch } from '@gitroom/helpers/utils/custom.fetch';
|
||||
import { useT } from '@gitroom/react/translation/get.transation.service.client';
|
||||
import { useVariables } from '@gitroom/react/helpers/variable.context';
|
||||
import { useSearchParams } from 'next/navigation';
|
||||
import useSWR from 'swr';
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ import useSWR from 'swr';
|
|||
import { FC, useCallback, useState } from 'react';
|
||||
import clsx from 'clsx';
|
||||
import { useClickAway } from '@uidotdev/usehooks';
|
||||
import interClass from '@gitroom/react/helpers/inter.font';
|
||||
import ReactLoading from 'react-loading';
|
||||
import { useT } from '@gitroom/react/translation/get.transation.service.client';
|
||||
function replaceLinks(text: string) {
|
||||
|
|
@ -30,7 +29,7 @@ export const ShowNotification: FC<{
|
|||
return (
|
||||
<div
|
||||
className={clsx(
|
||||
`text-textColor px-[16px] py-[10px] border-b border-tableBorder last:border-b-0 transition-colors ${interClass} overflow-hidden text-ellipsis`,
|
||||
`text-textColor px-[16px] py-[10px] border-b border-tableBorder last:border-b-0 transition-colors overflow-hidden text-ellipsis`,
|
||||
newNotification && 'font-bold bg-seventh animate-newMessages'
|
||||
)}
|
||||
dangerouslySetInnerHTML={{
|
||||
|
|
@ -53,7 +52,7 @@ export const NotificationOpenComponent = () => {
|
|||
className="opacity-0 animate-normalFadeDown mt-[10px] absolute w-[420px] min-h-[200px] top-[100%] end-0 bg-third text-textColor rounded-[16px] flex flex-col border border-tableBorder z-[20]"
|
||||
>
|
||||
<div
|
||||
className={`p-[16px] border-b border-tableBorder ${interClass} font-bold`}
|
||||
className={`p-[16px] border-b border-tableBorder font-bold`}
|
||||
>
|
||||
{t('notifications', 'Notifications')}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ import { useFetch } from '@gitroom/helpers/utils/custom.fetch';
|
|||
import { deleteDialog } from '@gitroom/react/helpers/delete.dialog';
|
||||
import { Input } from '@gitroom/react/form/input';
|
||||
import { useToaster } from '@gitroom/react/toaster/toaster';
|
||||
import interClass from '@gitroom/react/helpers/inter.font';
|
||||
import { useT } from '@gitroom/react/translation/get.transation.service.client';
|
||||
const ConnectedComponent: FC<{
|
||||
id: string;
|
||||
|
|
@ -34,7 +33,7 @@ const ConnectedComponent: FC<{
|
|||
|
||||
return (
|
||||
<div className="my-[16px] mt-[16px] h-[90px] bg-sixth border-fifth border rounded-[4px] p-[24px]">
|
||||
<div className={`flex items-center gap-[8px] ${interClass}`}>
|
||||
<div className={`flex items-center gap-[8px]`}>
|
||||
<div>
|
||||
<Image src="/icons/github.svg" alt="GitHub" width={40} height={40} />
|
||||
</div>
|
||||
|
|
@ -89,7 +88,7 @@ const ConnectComponent: FC<{
|
|||
|
||||
return (
|
||||
<div className="my-[16px] mt-[16px] h-[100px] bg-sixth border-fifth border rounded-[4px] px-[24px] flex">
|
||||
<div className={`flex items-center gap-[8px] ${interClass} flex-1`}>
|
||||
<div className={`flex items-center gap-[8px] flex-1`}>
|
||||
<div>
|
||||
<Image src="/icons/github.svg" alt="GitHub" width={40} height={40} />
|
||||
</div>
|
||||
|
|
@ -196,7 +195,7 @@ export const GithubComponent: FC<{
|
|||
))}
|
||||
{githubState.filter((f) => !f.login).length === 0 && (
|
||||
<div className="my-[16px] mt-[16px] h-[90px] bg-sixth border-fifth border rounded-[4px] p-[24px]">
|
||||
<div className={`flex items-center gap-[8px] ${interClass}`}>
|
||||
<div className={`flex items-center gap-[8px]`}>
|
||||
<div>
|
||||
<Image
|
||||
src="/icons/github.svg"
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@ import { AddTeamMemberDto } from '@gitroom/nestjs-libraries/dtos/settings/add.te
|
|||
import { useToaster } from '@gitroom/react/toaster/toaster';
|
||||
import { deleteDialog } from '@gitroom/react/helpers/delete.dialog';
|
||||
import copy from 'copy-to-clipboard';
|
||||
import interClass from '@gitroom/react/helpers/inter.font';
|
||||
import { useT } from '@gitroom/react/translation/get.transation.service.client';
|
||||
const roles = [
|
||||
{
|
||||
|
|
@ -213,7 +212,7 @@ export const TeamsComponent = () => {
|
|||
{+myLevel > +getLevel(p.role) ? (
|
||||
<div className="flex-1 flex justify-end">
|
||||
<Button
|
||||
className={`!bg-customColor3 !h-[24px] border border-customColor21 rounded-[4px] text-[12px] ${interClass}`}
|
||||
className={`!bg-customColor3 !h-[24px] border border-customColor21 rounded-[4px] text-[12px]`}
|
||||
onClick={remove(p)}
|
||||
secondary={true}
|
||||
>
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ import { ThirdPartyListComponent } from '@gitroom/frontend/components/third-part
|
|||
import React, { FC, useCallback, useState } from 'react';
|
||||
import useSWR from 'swr';
|
||||
import { useFetch } from '@gitroom/helpers/utils/custom.fetch';
|
||||
import interClass from '@gitroom/react/helpers/inter.font';
|
||||
import { useToaster } from '@gitroom/react/toaster/toaster';
|
||||
import { deleteDialog } from '@gitroom/react/helpers/delete.dialog';
|
||||
import useCookie from 'react-use-cookie';
|
||||
|
|
@ -65,7 +64,7 @@ export const ThirdPartyMenuComponent: FC<{
|
|||
{show && (
|
||||
<div
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
className={`absolute top-[100%] start-0 p-[8px] px-[20px] bg-fifth flex flex-col gap-[16px] z-[100] rounded-[8px] border border-tableBorder ${interClass} text-nowrap`}
|
||||
className={`absolute top-[100%] start-0 p-[8px] px-[20px] bg-fifth flex flex-col gap-[16px] z-[100] rounded-[8px] border border-tableBorder text-nowrap`}
|
||||
>
|
||||
<div
|
||||
className="flex gap-[12px] items-center"
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ import { clsx } from 'clsx';
|
|||
import { useFormContext } from 'react-hook-form';
|
||||
import dayjs from 'dayjs';
|
||||
import { useShowPostSelector } from '../../../../apps/frontend/src/components/post-url-selector/post.url.selector';
|
||||
import interClass from '../helpers/inter.font';
|
||||
import { TranslatedLabel } from '../translation/translated-label';
|
||||
|
||||
export const Canonical: FC<
|
||||
|
|
@ -59,7 +58,7 @@ export const Canonical: FC<
|
|||
return (
|
||||
<div className="flex flex-col gap-[6px]">
|
||||
<div className="flex items-center gap-[3px]">
|
||||
<div className={`${interClass} text-[14px]`}>
|
||||
<div className={`text-[14px]`}>
|
||||
<TranslatedLabel
|
||||
label={label}
|
||||
translationKey={translationKey}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import { FC, useCallback, useState } from 'react';
|
||||
import { HexColorPicker } from 'react-colorful';
|
||||
import { useFormContext } from 'react-hook-form';
|
||||
import interClass from '../helpers/inter.font';
|
||||
import { Button } from './button';
|
||||
import { useT } from '@gitroom/react/translation/get.transation.service.client';
|
||||
import { TranslatedLabel } from '../translation/translated-label';
|
||||
|
|
@ -73,7 +72,7 @@ export const ColorPicker: FC<{
|
|||
<div className="flex flex-col gap-[6px]">
|
||||
<div>
|
||||
{!!label && (
|
||||
<div className={`${interClass} text-[14px]`}>
|
||||
<div className={`text-[14px]`}>
|
||||
<TranslatedLabel
|
||||
label={label}
|
||||
translationKey={translationKey}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ import {
|
|||
useMemo,
|
||||
useState,
|
||||
} from 'react';
|
||||
import interClass from '../helpers/inter.font';
|
||||
import { clsx } from 'clsx';
|
||||
import { useFormContext } from 'react-hook-form';
|
||||
import { TranslatedLabel } from '../translation/translated-label';
|
||||
|
|
@ -83,7 +82,7 @@ export const CustomSelect: FC<{
|
|||
return (
|
||||
<div className={clsx('flex flex-col gap-[6px] relative', className)}>
|
||||
{!!label && (
|
||||
<div className={`${interClass} text-[14px]`}>
|
||||
<div className={`text-[14px]`}>
|
||||
<TranslatedLabel
|
||||
label={label}
|
||||
translationKey={translationKey}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ import {
|
|||
} from 'react';
|
||||
import { clsx } from 'clsx';
|
||||
import { useFormContext, useWatch } from 'react-hook-form';
|
||||
import interClass from '../helpers/inter.font';
|
||||
import { TranslatedLabel } from '../translation/translated-label';
|
||||
|
||||
export const Input: FC<
|
||||
|
|
@ -53,7 +52,7 @@ export const Input: FC<
|
|||
return (
|
||||
<div className="flex flex-col gap-[6px]">
|
||||
{!!label && (
|
||||
<div className={`${interClass} text-[14px]`}>
|
||||
<div className={`text-[14px]`}>
|
||||
<TranslatedLabel
|
||||
label={label}
|
||||
translationKey={translationKey}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ import {
|
|||
} from 'react';
|
||||
import { clsx } from 'clsx';
|
||||
import { useFormContext } from 'react-hook-form';
|
||||
import interClass from '../helpers/inter.font';
|
||||
import { RegisterOptions } from 'react-hook-form/dist/types/validator';
|
||||
import { TranslatedLabel } from '../translation/translated-label';
|
||||
|
||||
|
|
@ -47,7 +46,7 @@ export const Select: FC<
|
|||
}, [form?.formState?.errors?.[props?.name!]?.message, error]);
|
||||
return (
|
||||
<div className={clsx('flex flex-col', label ? 'gap-[6px]' : '')}>
|
||||
<div className={`${interClass} text-[14px]`}>
|
||||
<div className={`text-[14px]`}>
|
||||
<TranslatedLabel
|
||||
label={label}
|
||||
translationKey={translationKey}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,8 @@
|
|||
'use client';
|
||||
|
||||
import { DetailedHTMLProps, FC, InputHTMLAttributes, useMemo } from 'react';
|
||||
// @ts-ignore
|
||||
import clsx from 'clsx';
|
||||
import { useFormContext } from 'react-hook-form';
|
||||
import interClass from '../helpers/inter.font';
|
||||
import { TranslatedLabel } from '../translation/translated-label';
|
||||
|
||||
export const Textarea: FC<
|
||||
|
|
@ -42,7 +40,7 @@ export const Textarea: FC<
|
|||
props.disabled && 'opacity-50'
|
||||
)}
|
||||
>
|
||||
<div className={`${interClass} text-[14px]`}>
|
||||
<div className={`text-[14px]`}>
|
||||
<TranslatedLabel
|
||||
label={label}
|
||||
translationKey={translationKey}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import { FC, useCallback, useEffect } from 'react';
|
||||
import interClass from '../helpers/inter.font';
|
||||
import { clsx } from 'clsx';
|
||||
import { useFormContext } from 'react-hook-form';
|
||||
import { useT } from '@gitroom/react/translation/get.transation.service.client';
|
||||
|
|
@ -29,7 +28,7 @@ export const Total: FC<{
|
|||
|
||||
return (
|
||||
<div className="flex flex-col gap-[6px] relative w-[158px]">
|
||||
<div className={`${interClass} text-[14px]`}>{t('total', 'Total')}</div>
|
||||
<div className={`text-[14px]`}>{t('total', 'Total')}</div>
|
||||
<div
|
||||
className={clsx(
|
||||
'bg-input h-[44px] border-fifth border rounded-[4px] text-inputText placeholder-inputText items-center justify-center flex'
|
||||
|
|
|
|||
|
|
@ -1,7 +0,0 @@
|
|||
import { Inter } from 'next/font/google';
|
||||
const inter = Inter({
|
||||
subsets: ['latin'],
|
||||
display: 'swap',
|
||||
});
|
||||
const interClass = inter.className;
|
||||
export default interClass;
|
||||
|
|
@ -12,8 +12,7 @@
|
|||
"packageManager": "pnpm@10.6.1",
|
||||
"scripts": {
|
||||
"dev": "pnpm run --filter ./apps/extension --filter ./apps/workers --filter ./apps/backend --filter ./apps/frontend --parallel dev",
|
||||
"pm2": "pnpm dlx concurrently \"pnpm run pm2-run\" \"pnpm run entryfile\"",
|
||||
"entryfile": "./entrypoint.sh",
|
||||
"pm2": "pnpm run pm2-run",
|
||||
"publish-sdk": "pnpm run --filter ./apps/sdk publish",
|
||||
"pm2-run": "pm2 delete all || true && pnpm run prisma-db-push && pnpm run --parallel pm2 && pm2 logs",
|
||||
"dev:stripe": "pnpm dlx concurrently \"stripe listen --forward-to localhost:3000/stripe\" \"pnpm run dev\"",
|
||||
|
|
|
|||
|
|
@ -1,14 +0,0 @@
|
|||
:5000 {
|
||||
handle_path /api/* {
|
||||
reverse_proxy * localhost:3000
|
||||
}
|
||||
|
||||
handle_path /uploads/* {
|
||||
root * /uploads/
|
||||
file_server
|
||||
}
|
||||
|
||||
handle {
|
||||
reverse_proxy * localhost:4200
|
||||
}
|
||||
}
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -o xtrace
|
||||
|
||||
# Wait for port 4200 to be open
|
||||
while ! nc -z localhost 4200; do
|
||||
echo "Waiting for port 4200..."
|
||||
sleep 1
|
||||
done
|
||||
|
||||
# Wait for port 3000 to be open
|
||||
while ! nc -z localhost 3000; do
|
||||
echo "Waiting for port 3000..."
|
||||
sleep 1
|
||||
done
|
||||
|
||||
caddy run --config /app/Caddyfile
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
user www;
|
||||
worker_processes auto; # it will be determinate automatically by the number of core
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
sendfile on;
|
||||
access_log /var/log/nginx/access.log;
|
||||
client_max_body_size 2G;
|
||||
server {
|
||||
listen 5000;
|
||||
server_name _;
|
||||
gzip on;
|
||||
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
|
||||
|
||||
location /api/ {
|
||||
proxy_pass http://localhost:3000/;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header Reload $http_reload;
|
||||
proxy_set_header Onboarding $http_onboarding;
|
||||
proxy_set_header Activate $http_activate;
|
||||
proxy_set_header Auth $http_auth;
|
||||
proxy_set_header Showorg $http_showorg;
|
||||
proxy_set_header Impersonate $http_impersonate;
|
||||
proxy_set_header Accept-Language $http_accept_language;
|
||||
}
|
||||
|
||||
location / {
|
||||
proxy_pass http://localhost:4200/;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header Reload $http_reload;
|
||||
proxy_set_header Onboarding $http_onboarding;
|
||||
proxy_set_header Activate $http_activate;
|
||||
proxy_set_header Auth $http_auth;
|
||||
proxy_set_header Showorg $http_showorg;
|
||||
proxy_set_header Impersonate $http_impersonate;
|
||||
proxy_set_header Accept-Language $http_accept_language;
|
||||
proxy_set_header i18next $http_i18next;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
[supervisord]
|
||||
nodaemon=true
|
||||
logfile=/dev/null
|
||||
logfile_maxbytes=0
|
||||
user=root
|
||||
|
||||
[unix_http_server]
|
||||
file=/run/supervisord.sock
|
||||
|
||||
[include]
|
||||
files = /etc/supervisor.d/*.conf
|
||||
|
||||
[rpcinterface:supervisor]
|
||||
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
|
||||
|
||||
[supervisorctl]
|
||||
serverurl=unix:///run/supervisord.sock
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
[program:caddy]
|
||||
directory=/app
|
||||
command=caddy run --config /app/Caddyfile
|
||||
autostart=true
|
||||
autorestart=false
|
||||
redirect_stderr=true
|
||||
stdout_logfile=/dev/fd/1
|
||||
stdout_logfile_maxbytes=0
|
||||
startsecs=3
|
||||
Loading…
Reference in New Issue