Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to modify the upload file size to 100MB in the local deployment version of docker? Want to know the specific steps #3865

Closed
3 tasks done
ryanwong2023 opened this issue Apr 26, 2024 · 3 comments
Labels
📚 documentation Improvements or additions to documentation

Comments

@ryanwong2023
Copy link

Self Checks

  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit report (我已阅读并同意 Language Policy).
  • Pleas do not modify this template :) and fill in all the required fields.

Provide a description of requested docs changes

How to modify the upload file size to 100MB in the local deployment version of docker? Want to know the specific steps

Copy link

dosubot bot commented Apr 26, 2024

To modify the upload file size to 100MB in your local Docker deployment, you'll need to adjust both the application's configuration and the Nginx configuration if Nginx is being used. Here's how you can do it:

  1. Application Configuration: Set the UPLOAD_FILE_SIZE_LIMIT to 100. This can be done in several ways depending on how your environment is configured:

    • If using an .env file, add UPLOAD_FILE_SIZE_LIMIT=100.
    • In the Dockerfile, use ENV UPLOAD_FILE_SIZE_LIMIT=100.
    • For docker-compose, under services, add:
      environment:
        - UPLOAD_FILE_SIZE_LIMIT=100
  2. Nginx Configuration: Increase the client_max_body_size to 100M in your nginx.conf to allow for 100MB uploads. This directive should be placed within the http block:

    http {
        ...
        client_max_body_size 100M;
        ...
    }
    

After making these changes, rebuild your Docker containers and restart your application and Nginx service to apply the new upload file size limit.

Please ensure to check other related configurations and be aware of potential issues that could arise from increasing the upload file size limit.

Details

Sources


About Dosu
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

To continue the conversation, mention @dosu.

@dosubot dosubot bot added the 📚 documentation Improvements or additions to documentation label Apr 26, 2024
@FarVision2
Copy link

Find the env example file under
dify/api /.env.example

in there, you are looking for
Upload configuration

edit to what you wish and rename the file to .env

copy the .env file to
\dify\docker

The docker-compose.yaml file needs to have the environment variable entry added.

version: '3'
services:
  # API service
  api:
    image: langgenius/dify-api:x.x.x
    restart: always
    env_file:
      - .env
    environment:
      # Startup mode, 'api' starts the API server.
      MODE: api
      # The log level for the application. Supported values are `DEBUG`, `INFO`, `WARNING`, `ERROR`, `CRITICAL`
      LOG_LEVEL: INFO

run your docker-compose up -d like usual.

After that, all your configuration scripts will built off that. You should do not have to manually edit any other files

one thing to watch out for is making the limits too large and your embedding API will time out, and the token estimate generator may not return in time and also time out.

A general rule of thumb I like to keep is if you are loading many small files is not a problem but if you are loading larger files do one or two at a time, do not load the entire thing up as much as possible because things start timing out and you'll have to delete the partial entry and redo it again anyway

@crazywoola
Copy link
Member

See environments in docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📚 documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants