diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 00000000..620c5e1e --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +v22.9.0 diff --git a/Dockerfile b/Dockerfile index c3c69351..3d5358f0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -69,6 +69,11 @@ RUN --mount=type=cache,target=/root/.cache/uv \ # Then, use a final image without uv FROM python:3.12-slim-bookworm +# Install system dependencies, including libexpat1 and clean up the cache +RUN apt-get update && apt-get install -y --no-install-recommends \ + libexpat1 \ + && rm -rf /var/lib/apt/lists/* + # Copy the application from the builder COPY --from=builder --chown=app:app /app /app diff --git a/front/.env b/front/.env new file mode 100644 index 00000000..cfc9f71e --- /dev/null +++ b/front/.env @@ -0,0 +1 @@ +NEXT_PUBLIC_BACKEND_HOST=http://localhost:5000 \ No newline at end of file diff --git a/front/package-lock.json b/front/package-lock.json index ea0b4b58..33a69aab 100644 --- a/front/package-lock.json +++ b/front/package-lock.json @@ -1,12 +1,12 @@ { "name": "whombat-front", - "version": "0.6.1", + "version": "0.7.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "whombat-front", - "version": "0.6.1", + "version": "0.7.0", "dependencies": { "@headlessui-float/react": "^0.13.3", "@headlessui/react": "^1.7.19", diff --git a/front/src/app/api.ts b/front/src/app/api.ts index a81e60ee..c4d680bf 100644 --- a/front/src/app/api.ts +++ b/front/src/app/api.ts @@ -1,7 +1,7 @@ import createAPI from "@/lib/api"; const api = createAPI({ - baseURL: "http://localhost:5000", + baseURL: `${process.env.NEXT_PUBLIC_BACKEND_HOST}`, withCredentials: true, }); diff --git a/front/src/lib/api/common.ts b/front/src/lib/api/common.ts index 0a3e9475..b7b578b5 100644 --- a/front/src/lib/api/common.ts +++ b/front/src/lib/api/common.ts @@ -4,7 +4,7 @@ import { z } from "zod"; import { GetManySchema } from "@/lib/schemas"; -export const HOST = "http://localhost:5000"; +export const HOST = `${process.env.NEXT_PUBLIC_BACKEND_HOST}`; export const BASE_ROUTE = `/api/v1`; export const instance = axios.create({ diff --git a/front/src/lib/api/index.ts b/front/src/lib/api/index.ts index 12740cfa..e3e27e4f 100644 --- a/front/src/lib/api/index.ts +++ b/front/src/lib/api/index.ts @@ -36,7 +36,7 @@ type APIConfig = { }; const DEFAULT_CONFIG: APIConfig = { - baseURL: "http://localhost:5000", + baseURL: `${process.env.NEXT_PUBLIC_BACKEND_HOST}`, withCredentials: true, };