Bolt.diy on server with docker dosent read .env.local entrys

Trying to run bolt.diy on a Server and currently even with the keys entered into the .env.local both the productive and the development docker container boot up and work normally but they dont copy the API Keys from the .env.local. So every new PC that tries to access the bolt instance over the server needs to manually input the keys.

Hi @kilian.hecker,

try this as in docker-compose file for dev:

  app-dev:
    image: bolt-ai:development
    build:
      target: bolt-ai-development
    env_file: ".env.local"
    environment:
      - NODE_ENV=development
      - VITE_HMR_PROTOCOL=ws
      - VITE_HMR_HOST=localhost
      - VITE_HMR_PORT=5173
      - CHOKIDAR_USEPOLLING=true
      - WATCHPACK_POLLING=true
      - PORT=5173
      - VITE_LOG_LEVEL=${VITE_LOG_LEVEL:-debug}
      - DEFAULT_NUM_CTX=${DEFAULT_NUM_CTX:-32768}
      - RUNNING_IN_DOCKER=true
    extra_hosts:
      - "host.docker.internal:host-gateway"
    volumes:
      - type: bind
        source: .
        target: /app
        consistency: cached
      - /app/node_modules
    ports:
      - "5173:5173"
    command: pnpm run dev --host 0.0.0.0
    profiles: ["development", "default"]

Problems with the provided file from git:

  • Production:
    -=> has both .env.local and enviroment configured. environment overrites .env.local, so if the variables are not set, its empty

  • Development:
    => env_file is missing, so just environment there and if you not set it, its not working

@thecodacus we should use the env_file for dev and production as default for the providers and comment it in environment with a hint to the problem it brings as described.
what do you think?