Fixing up Docker Compose to work with hot reloads in development and environment variables

This commit is contained in:
Cole Medin 2024-11-01 07:09:19 -05:00
parent 349c5d54f7
commit 22ae9d800f
2 changed files with 10 additions and 3 deletions

View File

@ -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

View File

@ -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