mirror of
https://github.com/nimbusdotstorage/Nimbus
synced 2026-04-22 17:45:03 +02:00
CUT MORE SHIT
This commit is contained in:
@@ -44,7 +44,7 @@ VITE_FRONTEND_URL=http://localhost:3000
|
||||
# Database. Make sure the user, password, and database name match the ones in the url
|
||||
DATABASE_URL=postgres://postgres:postgres@localhost:5432/nimbus
|
||||
DATABASE_HOST=localhost
|
||||
POSTGRES_PORT=5432
|
||||
POSTGRES_PORT=6151
|
||||
POSTGRES_USER=postgres
|
||||
POSTGRES_PASSWORD=postgres
|
||||
POSTGRES_DB=nimbus
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
services:
|
||||
server:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
container_name: nimbus-server-local-compose
|
||||
restart: unless-stopped
|
||||
env_file: .env
|
||||
environment:
|
||||
NODE_ENV: production
|
||||
ports:
|
||||
- "${SERVER_PORT}:${SERVER_PORT}"
|
||||
@@ -1,12 +0,0 @@
|
||||
services:
|
||||
web:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
container_name: web-local-compose
|
||||
restart: unless-stopped
|
||||
env_file: .env
|
||||
environment:
|
||||
NODE_ENV: production
|
||||
ports:
|
||||
- "${WEB_PORT}:${WEB_PORT}"
|
||||
@@ -1,9 +1,7 @@
|
||||
import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from "@/components/ui/dialog";
|
||||
import { AuthProviderButtons } from "@/components/auth/shared/auth-provider-buttons";
|
||||
import { S3AccountForm } from "@/components/settings/s3-account-form";
|
||||
import { useLocation } from "@tanstack/react-router";
|
||||
import { useIsMounted } from "@/hooks/useIsMounted";
|
||||
import type { DriveProvider } from "@nimbus/shared";
|
||||
import { useEffect, useState } from "react";
|
||||
|
||||
type SigninAccountDialogProps = {
|
||||
@@ -20,13 +18,6 @@ export function SigninAccountDialog({ open, onOpenChange }: SigninAccountDialogP
|
||||
});
|
||||
const [callbackURL, setCallbackURL] = useState<string>("");
|
||||
const [viewMode, setViewMode] = useState<ViewMode>("select");
|
||||
const [isLoading] = useState<Record<DriveProvider, boolean>>({
|
||||
google: false,
|
||||
microsoft: false,
|
||||
s3: false,
|
||||
box: false,
|
||||
dropbox: false,
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
if (isMounted) {
|
||||
@@ -42,14 +33,6 @@ export function SigninAccountDialog({ open, onOpenChange }: SigninAccountDialogP
|
||||
}
|
||||
}, [open]);
|
||||
|
||||
const handleS3Success = () => {
|
||||
onOpenChange(false);
|
||||
};
|
||||
|
||||
const handleS3Cancel = () => {
|
||||
setViewMode("select");
|
||||
};
|
||||
|
||||
return (
|
||||
<Dialog open={open} onOpenChange={onOpenChange}>
|
||||
<DialogContent
|
||||
@@ -57,36 +40,15 @@ export function SigninAccountDialog({ open, onOpenChange }: SigninAccountDialogP
|
||||
showBackButton={viewMode === "s3-form"}
|
||||
onBack={() => setViewMode("select")}
|
||||
>
|
||||
{/*
|
||||
{viewMode === "s3-form" && (
|
||||
<DialogHeader className="py-2 text-center">
|
||||
<DialogTitle>Add S3 Account</DialogTitle>
|
||||
<DialogDescription>Enter your S3 credentials to connect your bucket.</DialogDescription>
|
||||
</DialogHeader>
|
||||
)}
|
||||
*/}
|
||||
{viewMode === "select" && (
|
||||
<DialogHeader>
|
||||
<DialogTitle>Sign in with an account</DialogTitle>
|
||||
<DialogDescription>Connect a social account to sign in with it later.</DialogDescription>
|
||||
</DialogHeader>
|
||||
)}
|
||||
{viewMode === "select" ? (
|
||||
<div className="flex flex-col gap-4 py-4">
|
||||
<AuthProviderButtons
|
||||
action="signin"
|
||||
isLoading={isLoading}
|
||||
showS3Button={true}
|
||||
callbackURL={callbackURL}
|
||||
onAuthSuccess={() => onOpenChange(false)}
|
||||
onS3Click={() => setViewMode("s3-form")}
|
||||
/>
|
||||
</div>
|
||||
) : (
|
||||
<div className="py-4">
|
||||
<S3AccountForm onSuccess={handleS3Success} onCancel={handleS3Cancel} />
|
||||
</div>
|
||||
)}
|
||||
<div className="flex flex-col gap-4 py-4">
|
||||
<AuthProviderButtons action="signin" callbackURL={callbackURL} />
|
||||
</div>
|
||||
</DialogContent>
|
||||
</Dialog>
|
||||
);
|
||||
|
||||
@@ -47,18 +47,8 @@ function RootComponent() {
|
||||
</div>
|
||||
</ThemeProvider>
|
||||
</AppProviders>
|
||||
<TanStackDevtools
|
||||
plugins={[
|
||||
{
|
||||
name: "TanStack Router",
|
||||
render: <TanStackRouterDevtools />,
|
||||
},
|
||||
{
|
||||
name: "React Query",
|
||||
render: <ReactQueryDevtools />,
|
||||
},
|
||||
]}
|
||||
/>
|
||||
<TanStackRouterDevtools />
|
||||
<ReactQueryDevtools />
|
||||
</ReactQueryProvider>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
services:
|
||||
# Database Service
|
||||
db:
|
||||
image: postgres:16
|
||||
image: postgres:17-alpine
|
||||
container_name: nimbus-db
|
||||
restart: unless-stopped
|
||||
env_file: .env
|
||||
@@ -9,8 +9,9 @@ services:
|
||||
POSTGRES_USER: ${POSTGRES_USER}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||
POSTGRES_DB: ${POSTGRES_DB}
|
||||
POSTGRES_PORT: ${POSTGRES_PORT}
|
||||
ports:
|
||||
- "5432:5432"
|
||||
- "6151:5432"
|
||||
volumes:
|
||||
- postgres-data:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
@@ -23,7 +24,7 @@ services:
|
||||
|
||||
# Cache Service
|
||||
cache:
|
||||
image: valkey/valkey:latest
|
||||
image: valkey/valkey:9-alpine
|
||||
container_name: nimbus-cache
|
||||
restart: unless-stopped
|
||||
env_file: .env
|
||||
|
||||
19
package.json
19
package.json
@@ -17,28 +17,25 @@
|
||||
"packageManager": "bun@1.2.17",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"knip": "knip-bun --config knip.config.ts",
|
||||
"dev": "turbo dev",
|
||||
"dev:up": "docker compose up -d db cache",
|
||||
"dev:web": "bun --elide-lines 0 --filter @nimbus/web --env-file .env dev",
|
||||
"dev:server": "bun --elide-lines 0 --filter @nimbus/server --env-file .env dev",
|
||||
"dev": "turbo dev",
|
||||
"db:up": "bun run --cwd=packages/db docker:up",
|
||||
"db:down": "bun run --cwd=packages/db docker:down",
|
||||
"db:reset": "bun run --cwd=packages/db docker:reset",
|
||||
"db:push": "bun --elide-lines 0 --filter @nimbus/db --env-file .env push",
|
||||
"cache:up": "bun run --cwd=packages/cache docker:up",
|
||||
"cache:down": "bun run --cwd=packages/cache docker:down",
|
||||
"cache:reset": "bun run --cwd=packages/cache docker:reset",
|
||||
"dev:down": "docker compose down",
|
||||
"dev:reset": "docker compose down && docker compose up -d db cache",
|
||||
"build": "turbo build",
|
||||
"start": "turbo start",
|
||||
"db:push": "bun --elide-lines 0 --filter @nimbus/db --env-file .env push",
|
||||
"env:sync": "bun run scripts/copy-env-files.ts",
|
||||
"env:clean": "bun run scripts/delete-child-env-files.ts",
|
||||
"docker:build": "docker compose build",
|
||||
"docker:up": "docker compose up",
|
||||
"docker:down": "docker compose down",
|
||||
"docker:remove": "docker compose down --rmi local -v",
|
||||
"docker:reset": "bun run docker:remove && bun run docker:up",
|
||||
"format": "bun prettier . --write --list-different",
|
||||
"docker:remove": "docker compose down --rmi local -v",
|
||||
"lint": "bun run oxlint --fix",
|
||||
"knip": "knip-bun --config knip.config.ts",
|
||||
"format": "bun prettier . --write --list-different",
|
||||
"prepare": "husky"
|
||||
},
|
||||
"type": "module",
|
||||
|
||||
27
packages/cache/docker-compose.yml
vendored
27
packages/cache/docker-compose.yml
vendored
@@ -1,27 +0,0 @@
|
||||
services:
|
||||
cache:
|
||||
image: valkey/valkey:latest
|
||||
container_name: nimbus-cache
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "6379:6379"
|
||||
command:
|
||||
[
|
||||
"sh",
|
||||
"-c",
|
||||
'valkey-server --requirepass "$VALKEY_PASSWORD" "--user $VALKEY_USERNAME on >$VALKEY_PASSWORD ~* +@all" "--user
|
||||
default off"',
|
||||
]
|
||||
environment:
|
||||
- VALKEY_PASSWORD=${VALKEY_PASSWORD}
|
||||
volumes:
|
||||
- valkey-data:/var/lib/valkey/data
|
||||
healthcheck:
|
||||
test: ["CMD", "valkey-cli", "ping"]
|
||||
interval: 10s
|
||||
timeout: 3s
|
||||
retries: 5
|
||||
|
||||
volumes:
|
||||
valkey-data:
|
||||
name: nimbus-cache-data
|
||||
1
packages/cache/package.json
vendored
1
packages/cache/package.json
vendored
@@ -8,7 +8,6 @@
|
||||
"./rate-limiters": "./src/rate-limiters.ts"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "docker compose up",
|
||||
"lint": "bun run oxlint . --fix",
|
||||
"format": "bun prettier . --write --list-different",
|
||||
"docker:up": "docker compose up -d",
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
services:
|
||||
db:
|
||||
image: postgres:16
|
||||
container_name: nimbus-db
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
POSTGRES_USER: ${POSTGRES_USER}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||
POSTGRES_DB: ${POSTGRES_DB}
|
||||
ports:
|
||||
- "5432:5432"
|
||||
volumes:
|
||||
- postgres-data:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
volumes:
|
||||
postgres-data:
|
||||
name: nimbus-db-data
|
||||
@@ -4,7 +4,6 @@
|
||||
"type": "module",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "docker compose up",
|
||||
"lint": "bun run oxlint . --fix",
|
||||
"format": "bun prettier . --write --list-different",
|
||||
"push": "bun --bun run drizzle-kit push --config=drizzle.config.ts",
|
||||
|
||||
Reference in New Issue
Block a user