简体   繁体   English

来自docker的存储卷在Azure中组成哪里?

[英]Where are stored volumes from docker compose in Azure?

I haven't find the answer elsewhere, so I try to ask here. 我在其他地方找不到答案,所以我尝试在这里提问。 Hope it's not silly question for I'm new both to docker compose and Azure. 希望这不是一个愚蠢的问题,因为我对docker compose和Azure都是新手。

I'm using docker compose for deploying Web App (actually bookstack ) into Azure. 我正在使用docker compose将Web App(实际上是bookstack )部署到Azure中。 The stack uses few volumes. 堆栈使用很少的卷。 Everything works just fine, volumes are persistent. 一切正常,卷是持久的。 Only I'm not able to locate volumes used inside Azure portal. 只有我无法找到Azure门户内部使用的卷。 I really need to be able to access these in order to backup or maybe migrate them. 我确实需要能够访问它们以进行备份或迁移。

version: '2'
services:
  mysql:
    image: mysql:5.7.21
    environment:
    - MYSQL_ROOT_PASSWORD=
    - MYSQL_DATABASE=
    - MYSQL_USER=
    - MYSQL_PASSWORD=
    volumes:
    - mysql-data:/var/lib/mysql

  bookstack:
    image: solidnerd/bookstack:latest
    depends_on:
    - mysql
    environment:
    - DB_HOST=
    - DB_DATABASE=
    - DB_USERNAME=
    - DB_PASSWORD=
    volumes:
    - uploads:/var/www/bookstack/public/uploads
    - storage-uploads:/var/www/bookstack/public/storage
    ports:
    - "8088:80"

volumes:
 mysql-data:
 uploads:
 storage-uploads:

Thanks in advance! 提前致谢! Jakub 的Jakub

You just need to change these lines to use the placeholder variable: 您只需要更改这些行即可使用占位符变量:

- uploads:/var/www/bookstack/public/uploads
- storage-uploads:/var/www/bookstack/public/storage

as follows: 如下:

- ${WEBAPP_STORAGE_HOME}/uploads:/var/www/bookstack/public/uploads
- ${WEBAPP_STORAGE_HOME}/storage-uploads:/var/www/bookstack/public/storage

You may want to take a look at the FTP file structure to determine where you want to map the files to :) 您可能要看一下FTP文件结构,以确定要将文件映射到的位置:)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM