Cole Medin commited on
Commit
22ae9d8
·
1 Parent(s): 349c5d5

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

Browse files
Files changed (2) hide show
  1. .env.example +1 -1
  2. docker-compose.yaml +9 -2
.env.example CHANGED
@@ -1,4 +1,4 @@
1
- # Rename this file to .env.local once you have filled in the below environment variables!
2
 
3
  # Get your GROQ API Key here -
4
  # https://console.groq.com/keys
 
1
+ # Rename this file to .env once you have filled in the below environment variables!
2
 
3
  # Get your GROQ API Key here -
4
  # https://console.groq.com/keys
docker-compose.yaml CHANGED
@@ -30,7 +30,11 @@ services:
30
  target: bolt-ai-development
31
  environment:
32
  - NODE_ENV=development
33
- - COMPOSE_PROFILES=development
 
 
 
 
34
  - PORT=5173
35
  - GROQ_API_KEY=${GROQ_API_KEY}
36
  - OPENAI_API_KEY=${OPENAI_API_KEY}
@@ -40,7 +44,10 @@ services:
40
  - OLLAMA_API_BASE_URL=${OLLAMA_API_BASE_URL}
41
  - VITE_LOG_LEVEL=${VITE_LOG_LEVEL:-debug}
42
  volumes:
43
- - .:/app
 
 
 
44
  - /app/node_modules
45
  ports:
46
  - "5173:5173" # Same port, no conflict as only one runs at a time
 
30
  target: bolt-ai-development
31
  environment:
32
  - NODE_ENV=development
33
+ - VITE_HMR_PROTOCOL=ws
34
+ - VITE_HMR_HOST=localhost
35
+ - VITE_HMR_PORT=5173
36
+ - CHOKIDAR_USEPOLLING=true
37
+ - WATCHPACK_POLLING=true
38
  - PORT=5173
39
  - GROQ_API_KEY=${GROQ_API_KEY}
40
  - OPENAI_API_KEY=${OPENAI_API_KEY}
 
44
  - OLLAMA_API_BASE_URL=${OLLAMA_API_BASE_URL}
45
  - VITE_LOG_LEVEL=${VITE_LOG_LEVEL:-debug}
46
  volumes:
47
+ - type: bind
48
+ source: .
49
+ target: /app
50
+ consistency: cached
51
  - /app/node_modules
52
  ports:
53
  - "5173:5173" # Same port, no conflict as only one runs at a time