Skip to content

简易配置容器数据映射 #19

Description

@songhuangcn

当前容器的数据映射配置较麻烦,例如 mysql 的:

.base: &base
  {}
.run_options: &run_options
  p: "3306:3306"
  e: "MYSQL_ALLOW_EMPTY_PASSWORD=yes"
  v: "<%= DPM::HOME %>/data/<%= package_name %>/<%= package_tag || 'default' %>:/var/lib/mysql"
.run_args: &run_args
  character-set-server: "utf8mb4"
  collation-server: "utf8mb4_unicode_ci"

希望可以做到 base 项中声明容器的数据路径,然后自动按照约定配置好数据映射,例如实现以下配置能跟上面效果做到一致:

.base: &base
  volume_data: "/var/lib/mysql"
.run_options: &run_options
  p: "3306:3306"
  e: "MYSQL_ALLOW_EMPTY_PASSWORD=yes"
.run_args: &run_args
  character-set-server: "utf8mb4"
  collation-server: "utf8mb4_unicode_ci"

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions