diff --git a/Dockerfile b/Dockerfile index b3cac1e..6849ee8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,12 @@ FROM node:22-slim AS base -LABEL org.opencontainers.image.source=https://github.com/ssciwr/onehealth-frontend -LABEL org.opencontainers.image.description="Onehealth Frontend" +LABEL org.opencontainers.image.source=https://github.com/ssciwr/heiplanet-frontend +LABEL org.opencontainers.image.description="Heiplanet Frontend" LABEL org.opencontainers.image.licenses=MIT ENV PNPM_HOME="/pnpm" ENV PATH="$PNPM_HOME:$PATH" +ENV VITE_NUTS_API_BASE="http://api:8000" RUN corepack enable WORKDIR /app @@ -18,7 +19,7 @@ FROM base AS build RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile COPY frontend/ . ENV NODE_ENV=production -RUN pnpm build +RUN VITE_NUTS_API_BASE=$VITE_NUTS_API_BASE pnpm build FROM nginx:alpine diff --git a/docker-compose.yml b/docker-compose.yml index de0aa86..3a2ad32 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,6 +1,6 @@ services: frontend: - image: ghcr.io/ssciwr/onehealth-map-frontend:latest + image: ghcr.io/ssciwr/heiplanet-frontend:main build: context: . dockerfile: Dockerfile diff --git a/nginx/conf/nginx.conf b/nginx/conf/nginx.conf index 0ead669..b9e28ca 100644 --- a/nginx/conf/nginx.conf +++ b/nginx/conf/nginx.conf @@ -13,10 +13,10 @@ server { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; } - # Serve the app from /onehealth-map-frontend/ - location /onehealth-map-frontend/ { + # Serve the app from /heiplanet-frontend/ + location /heiplanet-frontend/ { alias /usr/share/nginx/html/; - try_files $uri $uri/ /onehealth-map-frontend/index.html; + try_files $uri $uri/ /heiplanet-frontend/index.html; } # Serve assets with correct MIME types - more specific regex