Skip to content
esc
Type to search the docs
Back to catalog

Dify

Draft

AI application development platform

Set up on Launchfile

Choose your app settings, save them to your workspace, then launch on Launchfile hosting. Checking settings does not start a subscription or charge you.

This entry does not have a verified published Launchfile. You can provide your own Launchfile to check its settings.

This step saves your selection. It does not launch an app or start a subscription.

Run locally

Terminal
$ npx launchfile up dify

Requires Docker Desktop. No source code needed — pulls pre-built images and starts Dify with all dependencies.

Image:langgenius/dify-api:latest
LaunchfileView on GitHub
# yaml-language-server: $schema=https://launchfile.dev/schema/v1
version: launch/v1
name: dify
description: "AI application development platform"

secrets:
  secret-key:
    generator: secret

components:
  api:
    image: langgenius/dify-api:latest
    provides:
      - name: api
        protocol: http
        port: 5001
    requires:
      - type: postgres
        set_env:
          DB_HOST: $host
          DB_PORT: $port
          DB_USERNAME: $user
          DB_PASSWORD: $password
          DB_DATABASE: $name
      - type: redis
        set_env:
          REDIS_HOST: $host
          REDIS_PORT: $port
          REDIS_PASSWORD: $password
    env:
      SECRET_KEY:
        default: "$secrets.secret-key"
        sensitive: true
        description: "Application secret key"
      CONSOLE_WEB_URL:
        default: "http://localhost:3000"
        description: "Console web URL"
      CONSOLE_API_URL:
        default: "http://localhost:5001"
        description: "Console API URL"
      SERVICE_API_URL:
        default: "http://localhost:5001"
        description: "Service API URL"
      APP_WEB_URL:
        default: "http://localhost:3000"
        description: "App web URL"
      LOG_LEVEL:
        default: INFO
        description: "Logging level"
      MIGRATION_ENABLED:
        default: "true"
        description: "Run database migrations on startup"
    storage:
      data:
        path: /app/api/storage
        persistent: true
    health:
      path: /health
      start_period: 30s
    restart: always

  worker:
    image: langgenius/dify-api:latest
    depends_on:
      - component: api
        condition: healthy
    requires:
      - type: postgres
        set_env:
          DB_HOST: $host
          DB_PORT: $port
          DB_USERNAME: $user
          DB_PASSWORD: $password
          DB_DATABASE: $name
      - type: redis
        set_env:
          REDIS_HOST: $host
          REDIS_PORT: $port
          REDIS_PASSWORD: $password
    env:
      SECRET_KEY:
        default: "$secrets.secret-key"
        sensitive: true
        description: "Application secret key, shared with api via secrets.secret-key"
      MODE:
        default: worker
        description: "Run mode"
      LOG_LEVEL:
        default: INFO
        description: "Logging level"
    commands:
      start: "celery -A app.celery worker -Q dataset,generation,mail,ops_trace --loglevel=info"
    singleton: true
    restart: always

  web:
    image: langgenius/dify-web:latest
    depends_on:
      - component: api
        condition: healthy
    provides:
      - protocol: http
        port: 3000
        exposed: true
    env:
      CONSOLE_API_URL:
        default: $components.api.url
        description: "Backend API URL"
      APP_API_URL:
        default: $components.api.url
        description: "App API URL"
    health: /
    restart: always

Required Services

postgresredis

Components

3 components in this Launchfile.

apiworkerweb

Learn More

Spec references for features used in this Launchfile.

Related Apps