Giter VIP home page Giter VIP logo

Comments (5)

ethyoo avatar ethyoo commented on August 18, 2024 1

I'm not familiar with AWS CDK or ECS, specifically, but Docker supports an env_file attribute using docker run --env-file ... or by adding the attribute to a Docker Compose file.

It looks like you can pass a list of files to environmentFiles in an ECS task definition: "This parameter maps to the --env-file option to docker run."

from anything-llm.

mdvertola avatar mdvertola commented on August 18, 2024 1

Yes @timothycarambat you hit it right on the head. Apologies if not entirely clear on my end @ethyoo.

Based on @timothycarambat & @ethyoo's discussion would it be worth reframing the goal of this issue towards separating environment variables/files (defined as those that must be set at time of deployment and remain constant throughout a deployment) from application configuration variables/files (defined as those set or changed during application usage).

In other words, what if we move all of the configurations that are either set during the initial setup walkthrough screens or when users make changes to admin settings away from writing to the .env file and into a configuration file inside of /app/storage?

Slightly echoing what @timothycarambat mentioned earlier is that I think the core problem I am trying to solve for here is that anythingllm is writing back to that .env file which is creates a more difficult situation to try to build around.

from anything-llm.

timothycarambat avatar timothycarambat commented on August 18, 2024

@ethyoo I think that CLI arg only specifies a file for which docker to load ENVs from, which in general would work, but the issue would be persistence since the system does write back changes in ENV params from the app back to a file - which i believe if the primary ask. The changes are written, but the changes are then destroyed when the ephemeral container storage is killed.

from anything-llm.

ethyoo avatar ethyoo commented on August 18, 2024

I think that goes back to best practices for persistent storage and choosing storage options for Amazon ECS tasks.

from anything-llm.

timothycarambat avatar timothycarambat commented on August 18, 2024

Among other places where the ENV is loaded we can start with modifications here:

const envPath = path.join(__dirname, "../../.env");

from anything-llm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.