This commit is contained in:
Jamitz 2026-01-06 15:11:08 +00:00
parent d8de720f8c
commit 287c47d53d
3 changed files with 7 additions and 12 deletions

View file

@ -3,14 +3,9 @@ services:
build:
context: ./backend
container_name: fastnotes-api
# NO ports section at all - Coolify handles this
ui:
build:
context: ./frontend
args:
VITE_API_URL: https://notesapi.fitzythe.dev
container_name: fastnotes-ui
# NO ports section at all
depends_on:
- api
VITE_API_URL: /api

View file

@ -3,9 +3,9 @@ import createClient from "openapi-fetch";
import { camelizeKeys, decamelizeKeys } from "humps";
import type { paths } from "@/types/api";
const API_URL =
import.meta.env.VITE_API_URL ||
(import.meta.env.PROD ? "/api" : "http://localhost:8000/");
const API_URL = import.meta.env.PROD
? "/api" // ← Same domain, different path
: "http://localhost:8000/api";
// Create the base client with full type safety
export const client = createClient<paths>({

View file

@ -33,9 +33,9 @@ interface AuthState {
clearAll: () => void;
}
const API_URL =
import.meta.env.VITE_API_URL ||
(import.meta.env.PROD ? "/api" : "http://localhost:8000/");
const API_URL = import.meta.env.PROD
? "/api" // ← Same domain, different path
: "http://localhost:8000/api";
export const useAuthStore = create<AuthState>()(
persist(