Closed MartinBTM closed 2 weeks ago
@MartinBTM Hello there! I'm a bot here to help you with bugs, questions, or becoming a contributor. Let me know how I can assist you while you wait for a human maintainer.
To save the code in a code block in Dify version 0.6.14 when using the self-hosted Docker setup, you can follow these steps:
Clone the Dify source code to your local machine:
git clone https://github.com/langgenius/dify.git
Navigate to the docker directory in the Dify source code and execute the following commands to start the middleware services (PostgresSQL, Redis, Weaviate):
cd dify/docker
cp middleware.env.example middleware.env
docker compose -f docker-compose.middleware.yaml up -d
Navigate to the api
directory, copy the environment variable configuration file, generate a random secret key, and install dependencies:
cd ../api
cp .env.example .env
openssl rand -base64 42 | sed -i 's/SECRET_KEY=.*/SECRET_KEY=<your_value>/' .env
poetry env use 3.10
poetry install
Perform database migration:
poetry shell
flask db upgrade
Start the API service:
flask run --host 0.0.0.0 --port=5001 --debug
Start the Worker service for asynchronous tasks:
celery -A app.celery worker -P gevent -c 1 -Q dataset,generation,mail,ops_trace --loglevel INFO
Navigate to the web
directory, install dependencies, configure environment variables, build the code, and start the web service:
cd ../web
npm install
cp .env.example .env.local
npm run build
npm run start
Access Dify by visiting http://127.0.0.1:3000
in your web browser.
These steps should help you save and manage your code in a code block while using the self-hosted Docker setup for Dify version 0.6.14 [1][2].
To continue talking to Dosu, mention @dosu.
Please upgrade to v0.7.1 to see if this is resolved.
Self Checks
Dify version
0.6.14
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
when I fill in some code in code block, it can not save when I switch to other page, I try to publish, also not work see the pic below
✔️ Expected Behavior
save my code
❌ Actual Behavior
Return to the initial status