diff --git a/README.md b/README.md index 173f3c1..66b7b77 100644 --- a/README.md +++ b/README.md @@ -94,3 +94,7 @@ A Docker setup requires both Docker *and* Docker Compose. ```bash bun dev ``` + +## To-Do + +* [ ] Add documentation on .env diff --git a/app/api/git/user/route.ts b/app/api/git/user/route.ts index 68e6ae6..af901b6 100644 --- a/app/api/git/user/route.ts +++ b/app/api/git/user/route.ts @@ -20,7 +20,7 @@ export async function GET() { return NextResponse.json({ message: "User not found in database" }) } - const response = await fetch(`https://git.pontusmail.org/api/v1/users/${dbUser.username}`, { + const response = await fetch(`${process.env.GITEA_API_URL}/users/${dbUser.username}`, { headers: { Authorization: `Bearer ${process.env.GITEA_API_KEY}`, "Content-Type": "application/json", diff --git a/app/api/users/create/route.ts b/app/api/users/create/route.ts index 633497d..437c5cf 100644 --- a/app/api/users/create/route.ts +++ b/app/api/users/create/route.ts @@ -8,7 +8,7 @@ import { NextResponse } from "next/server" // (3) Migrate a p0ntus mail account to a LibreCloud account (creates/migrates Authentik/Email) async function createEmail(email: string, password: string, migrate: boolean) { - const response = await axios.post("http://localhost:6723/accounts/add", { + const response = await axios.post(`${process.env.MAIL_CONNECT_API_URL}/accounts/add`, { email, password, migrate, @@ -61,7 +61,7 @@ export async function POST(request: Request) { const response = await axios.request({ method: "post", maxBodyLength: Infinity, - url: "https://auth.librecloud.cc/api/v3/core/users/", + url: `${process.env.AUTHENTIK_API_URL}/core/users/`, headers: { "Content-Type": "application/json", Accept: "application/json", @@ -89,7 +89,7 @@ export async function POST(request: Request) { const updCfg = await axios.request({ method: "post", maxBodyLength: Infinity, - url: `https://auth.librecloud.cc/api/v3/core/users/${userID}/set_password/`, + url: `${process.env.AUTHENTIK_API_URL}/core/users/${userID}/set_password/`, headers: { "Content-Type": "application/json", Authorization: `Bearer ${process.env.AUTHENTIK_API_KEY}`, diff --git a/docker-compose.yml b/docker-compose.yml index 07ee879..1c4eef6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,6 +1,6 @@ services: librecloud-web: - image: "git.pontusmail.org/librecloud/web:latest" + build: . ports: - "3019:3000" environment: diff --git a/next.config.ts b/next.config.ts index 240eedd..f572cf1 100644 --- a/next.config.ts +++ b/next.config.ts @@ -3,7 +3,6 @@ import type { NextConfig } from "next" /** @type {NextConfig} */ const nextConfig: NextConfig = { reactStrictMode: true, - output: "standalone", images: { remotePatterns: [ {