Skip to content

Commit

Permalink
# upgrade gitlab[A
Browse files Browse the repository at this point in the history
  • Loading branch information
czy21 committed May 17, 2024
1 parent 1019d33 commit d0c3c7c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
10 changes: 6 additions & 4 deletions server/docker/doc-template.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
## git repo
## Git Repository
{%- for k,v in param_registry_git_repo_dict.items() %}
- {{ k }}: [{{ v }}]({{ v }}){:target=_blank}
{%- endfor %}
{%- if param_docker_dockerfile_dict %}
## dockerfile
## Dockerfile
{%- for k,v in param_docker_dockerfile_dict.items() %}
- {{ k }}
```dockerfile
{{ v["content"] }}
```
```bash
{{ v["command"] }}
```
{%- endfor %}
{%- endif %}
{%- if param_docker_compose_command %}
## docker-compose
## Docker Compose
```yaml
{{ param_docker_compose_content }}
```
Expand Down
3 changes: 2 additions & 1 deletion server/docker/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ def build(self) -> list[str]:
if self.any_doc_exclude(self.role_output_path):
rdd = {
t.name: {
"command": "docker build --tag {0} --file {1} . --pull".format(self.get_image_tag(registry_source_url, registry_source_dir, t), t.name)
"command": "docker build --tag {0} --file {1} . --pull".format(self.get_image_tag(registry_source_url, registry_source_dir, t), t.name),
"content": file_util.read_text(t),
} for t in sorted(self.role_output_path.glob("Dockerfile*"), reverse=True)}
docker_compose_command = "docker-compose --project-name {0} --file deploy.yml up --detach --remove-orphans".format(self.role_env.get("param_role_project_name", self.role_name))
md_content = template_util.Template(file_util.read_text(self.root_doc_template_file)).render(**{
Expand Down

0 comments on commit d0c3c7c

Please sign in to comment.