1

我正在尝试从 docker 容器将 Strapi SQLite 数据库持久保存在 Azure App Service Linux 主机上。

我尝试使用以下两种方法:

  1. https://docs.microsoft.com/en-us/azure/app-service/configure-custom-container#use-persistent-shared-storage
  2. https://docs.microsoft.com/en-us/azure/app-service/configure-connect-to-azure-storage?pivots=container-linux

两者都导致以下错误:

2020-08-30T01:48:39.664184204Z [2020-08-30T01:48:39.664Z] error Error: create table `core_store` (`id` integer not null primary key autoincrement, `key` varchar(255) null, `value` text null, `type` varchar(255) null, `environment` varchar(255) null, `tag` varchar(255) null) - SQLITE_BUSY: database is locked

这是我的docker-compose.yml

version: '3.3'

services:
  cms:
     image: myacr.azurecr.io/repo:latest-dev
     volumes:
      - ${WEBAPP_STORAGE_HOME}/site/wwwroot/dbstore:/cms/data
     ports:
       - "80:1337"
4

1 回答 1

0

该错误似乎是 SQLite 数据库的问题,而不是 Azure App 服务的问题。而且,Azure Web App 只公开了 80 和 443 端口。所以你需要将你需要的容器的端口映射到 80 或 443 端口。

于 2020-08-31T03:14:34.020 回答