Skip to content

Commit ec406fa

Browse files
authored
Merge pull request #40 from medsensio/feat/use-envs-for-endpoint
Feat/use envs for endpoint
2 parents 0bbc2ae + 571dcf6 commit ec406fa

File tree

7 files changed

+12
-5
lines changed

7 files changed

+12
-5
lines changed

.nvmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v22.9.0

Dockerfile

+5
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,11 @@ RUN --mount=type=cache,target=/root/.cache/uv \
6969
# Then, use a final image without uv
7070
FROM python:3.12-slim-bookworm
7171

72+
# Install system dependencies, including libexpat1 and clean up the cache
73+
RUN apt-get update && apt-get install -y --no-install-recommends \
74+
libexpat1 \
75+
&& rm -rf /var/lib/apt/lists/*
76+
7277
# Copy the application from the builder
7378
COPY --from=builder --chown=app:app /app /app
7479

front/.env

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
NEXT_PUBLIC_BACKEND_HOST=http://localhost:5000

front/package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

front/src/app/api.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import createAPI from "@/lib/api";
22

33
const api = createAPI({
4-
baseURL: "http://localhost:5000",
4+
baseURL: `${process.env.NEXT_PUBLIC_BACKEND_HOST}`,
55
withCredentials: true,
66
});
77

front/src/lib/api/common.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { z } from "zod";
44

55
import { GetManySchema } from "@/lib/schemas";
66

7-
export const HOST = "http://localhost:5000";
7+
export const HOST = `${process.env.NEXT_PUBLIC_BACKEND_HOST}`;
88
export const BASE_ROUTE = `/api/v1`;
99

1010
export const instance = axios.create({

front/src/lib/api/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ type APIConfig = {
3636
};
3737

3838
const DEFAULT_CONFIG: APIConfig = {
39-
baseURL: "http://localhost:5000",
39+
baseURL: `${process.env.NEXT_PUBLIC_BACKEND_HOST}`,
4040
withCredentials: true,
4141
};
4242

0 commit comments

Comments
 (0)