diff --git a/package.json b/package.json index e1c7549a..a300ae0c 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,8 @@ "build": "next build", "start": "next start", "lint": "next lint", - "init:appwrite": "cd .setup && npm install && npx ts-node index.ts" + "init:appwrite": "cd .setup && npm install && npx ts-node index.ts", + "deploy": "docker buildx build -t git.elias.li/stonith404/pingvin-share:latest --platform linux/amd64,linux/arm64 --push ." }, "dependencies": { "@mantine/core": "^4.1.3", diff --git a/src/services/share.service.ts b/src/services/share.service.ts index d55f9fc1..65ab7d77 100644 --- a/src/services/share.service.ts +++ b/src/services/share.service.ts @@ -3,14 +3,14 @@ import { AppwriteFileWithPreview } from "../types/File.type"; const get = async (shareId: string, password?: string) => { return ( - await axios.post(`http://localhost:3000/api/share/${shareId}`, { password }) + await axios.post(`/api/share/${shareId}`, { password }) ).data as AppwriteFileWithPreview[]; }; const authenticateWithPassword = async (shareId: string, password?: string) => { return ( await axios.post( - `http://localhost:3000/api/share/${shareId}/enterPassword`, + `/api/share/${shareId}/enterPassword`, { password } ) ).data as AppwriteFileWithPreview[]; diff --git a/src/utils/appwrite.util.ts b/src/utils/appwrite.util.ts index 338d74e6..2cc12b4f 100644 --- a/src/utils/appwrite.util.ts +++ b/src/utils/appwrite.util.ts @@ -3,7 +3,7 @@ import { Appwrite } from "appwrite"; // SDK for client side (browser) const aw = new Appwrite(); -aw.setEndpoint("http://localhost:86/v1") +aw.setEndpoint(process.env["APPWRITE_HOST"] as string) .setProject("pingvin-share"); export default aw;