diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..77ad197 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,4 @@ +data +docs +.git +.next \ No newline at end of file diff --git a/app/(auth)/layout.tsx b/app/(auth)/layout.tsx index 0fa7b99..ce023a1 100644 --- a/app/(auth)/layout.tsx +++ b/app/(auth)/layout.tsx @@ -15,3 +15,5 @@ export default function AuthLayout({ children }: { children: React.ReactNode }) ) } + +export const dynamic = "force-dynamic" diff --git a/docker-compose.production.yml b/docker-compose.production.yml new file mode 100644 index 0000000..92eb234 --- /dev/null +++ b/docker-compose.production.yml @@ -0,0 +1,27 @@ +services: + app: + image: ghcr.io/vas3k/taxhacker:latest + container_name: taxhacker_app + networks: + - taxhacker_network + environment: + - NODE_ENV=production + - UPLOAD_PATH=/app/data/uploads + env_file: + - .env + volumes: + - ./data:/app/data + restart: unless-stopped + extra_hosts: + - "host.docker.internal:host-gateway" + ports: + - "127.0.0.1:7331:7331" + logging: + driver: "json-file" + options: + max-size: "100M" + max-file: "3" + +networks: + taxhacker_network: + driver: bridge diff --git a/lib/auth.ts b/lib/auth.ts index 352f883..3d19423 100644 --- a/lib/auth.ts +++ b/lib/auth.ts @@ -20,6 +20,8 @@ export type UserProfile = { export const auth = betterAuth({ database: prismaAdapter(prisma, { provider: "postgresql" }), + appName: config.app.title, + secret: config.auth.secret, email: { provider: "resend", from: config.email.from, diff --git a/lib/config.ts b/lib/config.ts index 19e7b0e..df7db03 100644 --- a/lib/config.ts +++ b/lib/config.ts @@ -13,6 +13,7 @@ const config = { welcomeUrl: "/self-hosted", }, auth: { + secret: process.env.BETTER_AUTH_SECRET || "please-set-secret", loginUrl: "/enter", disableSignup: process.env.DISABLE_SIGNUP === "true" || process.env.SELF_HOSTED_MODE === "true", },