reverse proxy basics (#609)

This commit is contained in:
Saeed Vaziry
2025-06-10 00:14:05 +02:00
committed by GitHub
parent 4e6491a080
commit 09a9735962
7 changed files with 101 additions and 33 deletions

View File

@ -2,6 +2,7 @@ import { CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, C
import { useEffect, useState } from 'react';
import { Button } from '@/components/ui/button';
import { CommandIcon, SearchIcon } from 'lucide-react';
import CreateServer from '@/pages/servers/components/create-server';
export default function AppCommand() {
const [open, setOpen] = useState(false);
@ -33,7 +34,9 @@ export default function AppCommand() {
<CommandList>
<CommandEmpty>No results found.</CommandEmpty>
<CommandGroup heading="Suggestions">
<CommandItem>Create server</CommandItem>
<CreateServer>
<CommandItem>Create server</CommandItem>
</CreateServer>
<CommandItem>Create project</CommandItem>
</CommandGroup>
</CommandList>

View File

@ -47,7 +47,7 @@ function SheetContent({
<SheetPrimitive.Content
data-slot="sheet-content"
className={cn(
'bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500',
'bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col overflow-y-auto shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500',
side === 'right' &&
'data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm',
side === 'left' &&

View File

@ -25,6 +25,7 @@ type CreateSiteForm = {
php_version: string;
source_control: string;
user: string;
port: string;
};
export default function CreateSite({ server, children }: { server?: Server; children: ReactNode }) {
@ -39,6 +40,7 @@ export default function CreateSite({ server, children }: { server?: Server; chil
php_version: '',
source_control: '',
user: '',
port: '',
});
const submit: FormEventHandler = (e) => {
@ -154,6 +156,15 @@ export default function CreateSite({ server, children }: { server?: Server; chil
<InputError message={form.errors.aliases} />
</FormField>
<FormField>
<Label htmlFor="port">Reverse proxy port</Label>
<Input id="port" type="text" value={form.data.port} onChange={(e) => form.setData('port', e.target.value)} placeholder="3000" />
<p className="text-muted-foreground text-xs">
This port will be used for reverse proxying the site. It should be unique across all sites on the server.
</p>
<InputError message={form.errors.port} />
</FormField>
{page.props.configs.site_types_custom_fields[form.data.type].map((config) => getFormField(config))}
<FormField>