Skip to content

Commit

Permalink
#
Browse files Browse the repository at this point in the history
  • Loading branch information
czy21 committed May 17, 2024
1 parent dbacfc2 commit 1019d33
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions server/docker/doc-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
{%- endif %}
{%- if param_docker_compose_command %}
## docker-compose
```yaml
{{ param_docker_compose_content }}
```
```bash
{{ param_docker_compose_command }}
```
Expand Down
1 change: 1 addition & 0 deletions server/docker/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ def build(self) -> list[str]:
md_content = template_util.Template(file_util.read_text(self.root_doc_template_file)).render(**{
"param_registry_git_repo_dict": {t["name"]: "{}/{}/{}".format(t["url"], "tree/main", self.role_name) for t in self.role_env.get("param_registry_git_repos")},
"param_docker_dockerfile_dict": rdd,
"param_docker_compose_content": file_util.read_text(self.role_deploy_file) if self.role_deploy_file.exists() else None,
"param_docker_compose_command": docker_compose_command if self.role_deploy_file.exists() else None,
})
file_util.write_text(self.role_output_path.joinpath("doc.md"), md_content)
Expand Down
2 changes: 1 addition & 1 deletion server/share.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,5 @@ tar -zcf - --exclude="__pycache__" --exclude="${build_name}" \
-C $(realpath ${src_path}/../../) ${src_path_server_files} \
| ${host_cmd} "mkdir -p \$HOME/${dst_name};tar -zxf - -C \$HOME/${dst_name}"
${host_cmd} "${cmd}"
${host_cmd} "[ -d $HOME/${dst_name} ]" && ${host_cmd} "tar -zcf - -C \$HOME/${dst_name} ${tmp_name} ${build_name}" | tar -zxf - -C ${src_path}
${host_cmd} "[ -d \$HOME/${dst_name} ]" && ${host_cmd} "tar -zcf - -C \$HOME/${dst_name} ${tmp_name} ${build_name}" | tar -zxf - -C ${src_path}
${host_cmd} "${del_cmd}"

0 comments on commit 1019d33

Please sign in to comment.