You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何将Azure App Service中datalust/seq容器的/data映射到Web App的/home/data

Mapping datalust/seq's /data directory to Azure Web App's persistent /home/data

Great question! Since Azure Web App for Containers restricts direct use of docker run parameters like -v, we have two reliable ways to achieve this data persistence using application settings (environment variables), which aligns with your requirements:

datalust/seq natively supports configuring its storage path via an environment variable, which is the cleanest approach:

  • Enable persistent storage: Add an app setting WEBSITES_ENABLE_APP_SERVICE_STORAGE with value true. This mounts the Web App's /home directory to Azure Storage, ensuring data survives restarts/deployments.
  • Point seq to the persistent directory: Add another app setting SEQ_STORAGE_PATH with value /home/data. This tells seq to store all its data directly in the persistent /home/data directory (instead of the default /data).

No volume mapping is needed here—seq will write straight to the persistent location automatically.

Method 2: Pass volume mapping via Docker run arguments

If you prefer to stick with the traditional volume mapping approach (useful for containers that don't support path configuration via env vars):

  • First enable persistent storage: Same as Method 1, set WEBSITES_ENABLE_APP_SERVICE_STORAGE = true.
  • Add Docker run arguments: Create an app setting DOCKER_RUN_ARGS with value -v /home/data:/data. Azure Web App will append this parameter to the underlying docker run command when starting your seq container, creating the exact volume mapping you need.

Verification steps

After setting up either method:

  1. Restart your Web App to apply the new settings.
  2. Use the Kudu console (accessible via https://<your-app-name>.scm.azurewebsites.net) to:
    • Check the /home/data directory on the Web App host—you should see seq's data files here.
    • Or, access the container's shell via Kudu's "Container console" and verify the /data (Method 2) or /home/data (Method 1) directory contains your seq data.
  3. Restart the Web App again and confirm the data is still present to ensure persistence works.

内容的提问来源于stack exchange,提问作者Cpt Slow

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.29 08:44:40