From 22ae9d800f47f5b1744becb014cdebf75915d065 Mon Sep 17 00:00:00 2001 From: Cole Medin <47287758+coleam00@users.noreply.github.com> Date: Fri, 1 Nov 2024 07:09:19 -0500 Subject: [PATCH] Fixing up Docker Compose to work with hot reloads in development and environment variables --- .env.example | 2 +- docker-compose.yaml | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.env.example b/.env.example index 234dba955..ec825e8ee 100644 --- a/.env.example +++ b/.env.example @@ -1,4 +1,4 @@ -# Rename this file to .env.local once you have filled in the below environment variables! +# Rename this file to .env once you have filled in the below environment variables! # Get your GROQ API Key here - # https://console.groq.com/keys diff --git a/docker-compose.yaml b/docker-compose.yaml index ff4528337..8c4613640 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -30,7 +30,11 @@ services: target: bolt-ai-development environment: - NODE_ENV=development - - COMPOSE_PROFILES=development + - VITE_HMR_PROTOCOL=ws + - VITE_HMR_HOST=localhost + - VITE_HMR_PORT=5173 + - CHOKIDAR_USEPOLLING=true + - WATCHPACK_POLLING=true - PORT=5173 - GROQ_API_KEY=${GROQ_API_KEY} - OPENAI_API_KEY=${OPENAI_API_KEY} @@ -40,7 +44,10 @@ services: - OLLAMA_API_BASE_URL=${OLLAMA_API_BASE_URL} - VITE_LOG_LEVEL=${VITE_LOG_LEVEL:-debug} volumes: - - .:/app + - type: bind + source: . + target: /app + consistency: cached - /app/node_modules ports: - "5173:5173" # Same port, no conflict as only one runs at a time