Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
songhuangcn opened this issue Aug 24, 2022 · 0 comments
Open

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

songhuangcn opened this issue Aug 24, 2022 · 0 comments

Comments

@songhuangcn
Copy link
Owner

当前容器的数据映射配置较麻烦,例如 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"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant