Skip to content

Commit

Permalink
Change dockerfile path to client
Browse files Browse the repository at this point in the history
  • Loading branch information
David Mang committed Sep 1, 2024
1 parent 341c082 commit 739f64e
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ jobs:
include:
- dockerfile: ./docker/client/Dockerfile
image: ghcr.io/ls1intum/thaii/client
context: ./docker/client
context: .
path: client
- dockerfile: ./docker/server/Dockerfile
image: ghcr.io/ls1intum/thaii/server
context: ./docker/server
context: .
path: server
outputs:
server_image_tag: "${{ steps.output-tag-server.outputs.server_image_tag }}"
Expand Down
8 changes: 8 additions & 0 deletions client/src/api/insights.api.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
import { FilterBody } from "../types/statistics/statistics.types";
import api from "./interceptor.api";

//@filter:
// - dateRange: Dates included in analysis
// - page: Pages included in analysis
// - labels: Labels included in analysis
// - tags: Tags included in analysis

// Fetch number of total chats
export const fetchTotalChats = async (filter: FilterBody) => {
try {
const response = await api.post(`/api/v1/insights/total-chats/`, filter);
Expand All @@ -10,6 +17,7 @@ export const fetchTotalChats = async (filter: FilterBody) => {
}
};

// Fetch number of total messages
export const fetchTotalMessages = async (filter: FilterBody) => {
try {
const response = await api.post(`/api/v1/insights/total-messages/`, filter);
Expand Down
4 changes: 2 additions & 2 deletions docker/client/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ ENV VITE_API_URL=$VITE_API_URL

WORKDIR /client

COPY ./client/package*.json ./
COPY ../../client/package*.json ./

RUN npm install

COPY ./client .
COPY ../../client .

RUN npm run build

Expand Down
2 changes: 1 addition & 1 deletion docker/server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM python:3.12.4-slim-bookworm

WORKDIR /server

COPY ./server .
COPY ../../server .

RUN python3 -m venv /opt/venv && \
/opt/venv/bin/pip install --upgrade pip && \
Expand Down

0 comments on commit 739f64e

Please sign in to comment.