Skip to content

Commit

Permalink
Adding more files needed for the FE
Browse files Browse the repository at this point in the history
  • Loading branch information
macaab26 committed Nov 15, 2024
1 parent 25835fb commit 317884e
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 6 deletions.
4 changes: 4 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,7 @@ RAY_DASHBOARD_PORT=${RAY_DASHBOARD_PORT:-8265}
# Provide keys for external services as required by your application.
MISTRAL_API_KEY=${MISTRAL_API_KEY:-} # Optional: Key for Mistral API access.
OPENAI_API_KEY=${OPENAI_API_KEY:-} # Optional: Key for OpenAI API access.

# Frontend configuration
# URL to connect with the backend
VUE_APP_BASE_URL=http://localhost:8000/api/v1/
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ start-lumigator: .env

# Launches lumigator with no code mounted in, and forces build of containers (used in CI for integration tests)
start-lumigator-build: .env
RAY_ARCH_SUFFIX=$(RAY_ARCH_SUFFIX) docker compose --profile local -f $(LOCAL_DOCKERCOMPOSE_FILE) up -d --build
RAY_ARCH_SUFFIX=$(RAY_ARCH_SUFFIX) docker compose --profile local-fe -f $(LOCAL_DOCKERCOMPOSE_FILE) up -d --build

# Launches lumigator without local dependencies (ray, S3)
start-lumigator-external-services: .env
Expand Down
18 changes: 18 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ services:
- localstack-data:/var/lib/localstack
profiles:
- local
- local-fe

localstack-create-bucket:
image: localstack/localstack:3.4.0
Expand All @@ -33,6 +34,7 @@ services:
- "localhost:host-gateway"
profiles:
- local
- local-fe

ray:
image: rayproject/ray:2.30.0-py311-cpu${RAY_ARCH_SUFFIX}
Expand Down Expand Up @@ -77,6 +79,7 @@ services:
- "localhost:host-gateway"
profiles:
- local
- local-fe

backend:
image: mzdotai/lumigator:latest
Expand Down Expand Up @@ -124,6 +127,21 @@ services:
extra_hosts:
- "localhost:host-gateway"

frontend:
image: mzdotai/lumigator-frontend:latest
build:
context: .
dockerfile: "./lumigator/frontend/Dockerfile"
target: "server"
depends_on:
backend:
condition: "service_started"
required: true
ports:
- 80:80
profiles:
- local-fe

volumes:

localstack-data:
Expand Down
10 changes: 5 additions & 5 deletions lumigator/frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@ ARG NODE_VERSION=18.20.0
FROM node:${NODE_VERSION}-alpine AS base

# Copy the project into the image
COPY . /frontend
COPY ../../ /mzai

WORKDIR /frontend/
WORKDIR /mzai/

# Install dependencies
RUN npm install
RUN npm --prefix /mzai/lumigator/frontend install

# Build static files
RUN npm run build
RUN npm --prefix /mzai/lumigator/frontend run build


FROM nginx:1.27.2-alpine-slim AS server

# Copy builded files to the Nginx image
COPY --from=base /frontend/dist /usr/share/nginx/html
COPY --from=base /mzai/lumigator/frontend/dist /usr/share/nginx/html

EXPOSE 80

0 comments on commit 317884e

Please sign in to comment.