ansys-saf-cli 4.1.dev0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (143) hide show
  1. ansys/saf/cli/__init__.py +15 -0
  2. ansys/saf/cli/_cli/__init__.py +15 -0
  3. ansys/saf/cli/_cli/main.py +816 -0
  4. ansys/saf/cli/_cli/py.typed +0 -0
  5. ansys/saf/cli/_config/__init__.py +15 -0
  6. ansys/saf/cli/_config/const.py +45 -0
  7. ansys/saf/cli/_config/py.typed +0 -0
  8. ansys/saf/cli/_database/__init__.py +15 -0
  9. ansys/saf/cli/_database/manager.py +94 -0
  10. ansys/saf/cli/_database/models.py +53 -0
  11. ansys/saf/cli/_database/py.typed +0 -0
  12. ansys/saf/cli/_solutions/__init__.py +15 -0
  13. ansys/saf/cli/_solutions/add_step.py +256 -0
  14. ansys/saf/cli/_solutions/dependencies.py +162 -0
  15. ansys/saf/cli/_solutions/environment.py +1145 -0
  16. ansys/saf/cli/_solutions/plugins.py +254 -0
  17. ansys/saf/cli/_solutions/py.typed +0 -0
  18. ansys/saf/cli/_solutions/scaffolding.py +73 -0
  19. ansys/saf/cli/_solutions/templates/__init__.py +15 -0
  20. ansys/saf/cli/_solutions/templates/py.typed +0 -0
  21. ansys/saf/cli/_solutions/templates/solution/cookiecutter.json +18 -0
  22. ansys/saf/cli/_solutions/templates/solution/hooks/post_gen_project.py +54 -0
  23. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/.codespell.ignore +2 -0
  24. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/.devcontainer/devcontainer.json +26 -0
  25. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/.env +5 -0
  26. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/.flake8 +8 -0
  27. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/.github/labeler.yml +9 -0
  28. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/.github/labels.yml +27 -0
  29. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/.github/workflows/build-release.yml +175 -0
  30. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/.github/workflows/label.yml +89 -0
  31. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/.gitignore +137 -0
  32. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/.pre-commit-config.yaml +48 -0
  33. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/.release-please-manifest.json +3 -0
  34. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/.reuse/templates/copyright.jinja2 +1 -0
  35. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/.vscode/extensions.json +8 -0
  36. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/.vscode/launch.json +28 -0
  37. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/AUTHORS +12 -0
  38. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/CHANGELOG.md +1 -0
  39. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/CODEOWNERS +3 -0
  40. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/CODE_OF_CONDUCT.md +65 -0
  41. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/CONTRIBUTING.md +2 -0
  42. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/CONTRIBUTORS.md +9 -0
  43. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/LICENSE.rst +41 -0
  44. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/README.md +69 -0
  45. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/deployments/Dockerfile +43 -0
  46. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/deployments/README.md +13 -0
  47. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/deployments/distributed-deployment-template/.env +27 -0
  48. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/deployments/distributed-deployment-template/compose.yaml +132 -0
  49. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/deployments/standalone/.env +20 -0
  50. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/deployments/standalone/compose.yaml +118 -0
  51. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/deployments/standalone-with-hps/.env +28 -0
  52. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/deployments/standalone-with-hps/compose.yaml +146 -0
  53. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/deployments/standalone-with-minerva/.env +25 -0
  54. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/deployments/standalone-with-minerva/compose.yaml +122 -0
  55. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/doc/.vale.ini +28 -0
  56. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/doc/Makefile +30 -0
  57. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/doc/changelog.d/changelog_template.jinja +17 -0
  58. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/doc/make.bat +46 -0
  59. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/doc/source/_static/css/custom.css +8 -0
  60. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/doc/source/_static/images/repository-banner.png +0 -0
  61. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/doc/source/_templates/README.md +1 -0
  62. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/doc/source/changelog.rst +12 -0
  63. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/doc/source/conf.py +253 -0
  64. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/doc/source/examples.rst +8 -0
  65. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/doc/source/getting_started/desktop_installation.rst +165 -0
  66. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/doc/source/getting_started/docker_installation.rst +68 -0
  67. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/doc/source/index.rst +51 -0
  68. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/doc/source/user_guide/index.rst +6 -0
  69. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/doc/styles/config/vocabularies/ANSYS/accept.txt +5 -0
  70. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/doc/styles/config/vocabularies/ANSYS/reject.txt +0 -0
  71. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/examples/README.md +1 -0
  72. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/lock_files/dash/poetry.lock +7621 -0
  73. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/lock_files/no_ui/poetry.lock +7173 -0
  74. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/minerva/cli/README.md +3 -0
  75. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/minerva/oauth/App_Data/Certificates/README.md +3 -0
  76. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/minerva/oauth/oauth.config +9 -0
  77. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/pyproject.toml +192 -0
  78. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/release-please-config.json +9 -0
  79. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/sonar-project.properties +12 -0
  80. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/__init__.py +3 -0
  81. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/main.py +19 -0
  82. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/portal_assets/application.svg +36 -0
  83. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/portal_assets/description.json +3 -0
  84. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/portal_assets/project.svg +1 -0
  85. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/solution/definition.py +24 -0
  86. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/solution/first_step.py +34 -0
  87. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/solution/method_assets/README.md +1 -0
  88. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/solution/scripts/README.md +1 -0
  89. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/solution/scripts/assets/README.md +1 -0
  90. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/solution/second_step.py +12 -0
  91. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/ui/app.py +30 -0
  92. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/ui/assets/css/all.css +9 -0
  93. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/ui/assets/css/bootstrap.min.css +6 -0
  94. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/ui/assets/css/style.css +47 -0
  95. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/ui/assets/icons/dark/carbon--ibm-engineering-workflow-mgmt.svg +1 -0
  96. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/ui/assets/icons/dark/carbon--return.svg +1 -0
  97. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/ui/assets/icons/dark/game-icons--crossed-air-flows.svg +1 -0
  98. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/ui/assets/icons/dark/material-symbols--home.svg +1 -0
  99. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/ui/assets/icons/dark/radix-icons--moon.svg +1 -0
  100. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/ui/assets/icons/dark/radix-icons--sun.svg +1 -0
  101. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/ui/assets/icons/dark/streamline--startup-solid.svg +1 -0
  102. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/ui/assets/icons/dark/teenyicons--doc-solid.svg +1 -0
  103. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/ui/assets/icons/light/carbon--ibm-engineering-workflow-mgmt.svg +1 -0
  104. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/ui/assets/icons/light/carbon--return.svg +1 -0
  105. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/ui/assets/icons/light/game-icons--crossed-air-flows.svg +1 -0
  106. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/ui/assets/icons/light/material-symbols--home.svg +1 -0
  107. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/ui/assets/icons/light/radix-icons--moon.svg +1 -0
  108. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/ui/assets/icons/light/radix-icons--sun.svg +1 -0
  109. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/ui/assets/icons/light/streamline--startup-solid.svg +1 -0
  110. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/ui/assets/icons/light/teenyicons--doc-solid.svg +1 -0
  111. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/ui/assets/images/README.md +1 -0
  112. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/ui/assets/images/workflow-placeholder.png +0 -0
  113. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/ui/assets/installer/README.md +5 -0
  114. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/ui/assets/logos/dark/placeholder_logo.png +0 -0
  115. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/ui/assets/logos/light/placeholder_logo.png +0 -0
  116. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/ui/assets/orchestrator/README.md +3 -0
  117. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/ui/assets/pywebview/README.md +3 -0
  118. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/ui/assets/scripts/README.md +1 -0
  119. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/ui/components/README.md +1 -0
  120. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/ui/pages/about_page.py +71 -0
  121. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/ui/pages/first_page.py +147 -0
  122. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/ui/pages/page.py +367 -0
  123. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/src/{{ cookiecutter.__solution_namespace_path }}/{{cookiecutter.__solution_module_name}}/ui/pages/second_page.py +32 -0
  124. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/tests/common_test_files/README.md +1 -0
  125. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/tests/conftest.py +37 -0
  126. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/tests/unit/test_solution_api.py +42 -0
  127. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/tests/unit/test_solution_ui.py +30 -0
  128. ansys/saf/cli/_solutions/templates/solution/{{cookiecutter.__solution_name}}/tox.ini +56 -0
  129. ansys/saf/cli/_utilities/__init__.py +15 -0
  130. ansys/saf/cli/_utilities/archiver.py +67 -0
  131. ansys/saf/cli/_utilities/backup.py +181 -0
  132. ansys/saf/cli/_utilities/conversion.py +64 -0
  133. ansys/saf/cli/_utilities/platform.py +26 -0
  134. ansys/saf/cli/_utilities/py.typed +0 -0
  135. ansys/saf/cli/_utilities/solution_modules.py +173 -0
  136. ansys/saf/cli/integrations/solutions_manager.py +64 -0
  137. ansys/saf/cli/py.typed +0 -0
  138. ansys_saf_cli-4.1.dev0.dist-info/METADATA +201 -0
  139. ansys_saf_cli-4.1.dev0.dist-info/RECORD +143 -0
  140. ansys_saf_cli-4.1.dev0.dist-info/WHEEL +4 -0
  141. ansys_saf_cli-4.1.dev0.dist-info/entry_points.txt +3 -0
  142. ansys_saf_cli-4.1.dev0.dist-info/licenses/AUTHORS +12 -0
  143. ansys_saf_cli-4.1.dev0.dist-info/licenses/LICENSE +201 -0
@@ -0,0 +1,69 @@
1
+ {{cookiecutter.__solution_name}}
2
+ ====================================
3
+ |python|
4
+
5
+ .. note::
6
+ This content needs to be configured according to the project specifics.
7
+
8
+ # Team & Roles
9
+
10
+ | Role | Owner |
11
+ | ------------------------ | ------- |
12
+ | Solution Owner | XXXXXXX |
13
+ | Solution Product Manager | XXXXXXX |
14
+ | Domain ``SME`` | XXXXXXX |
15
+ | Development Manager | XXXXXXX |
16
+ | Solution developer | XXXXXXX |
17
+ | UI/UX | XXXXXXX |
18
+ | DevOps | XXXXXXX |
19
+ | Documentation | XXXXXXX |
20
+
21
+ # Prerequisites
22
+
23
+ | Prerequisite | Description |
24
+ |--------------|-------------|
25
+ | Operating system | Windows 10 or Ubuntu |
26
+ | Python distribution | Python {{ cookiecutter.__python_version }} |
27
+ | Supported Python distributions | Python 3.10, 3.11, 3.12, 3.13 and 3.14 |
28
+ | IDE | [Visual Studio Code](https://code.visualstudio.com/download#) |
29
+ | SAF CLI | Install [latest SAF CLI](https://dev-docs.external.solutions.ansys.com/version/stable/getting_started/prerequisites/saf_cli.html) |
30
+
31
+ # Install the solution
32
+
33
+ This assumes that SAF CLI is installed and the ``saf`` command is available in the terminal. Therefore, it is not strictly required to run the following commands from any directory in particular.
34
+
35
+ 1. Run the ``saf install`` command with the ``<solution_name>`` argument. By default, it will install ``desktop`` and ``ui`` dependency groups.
36
+
37
+ ```bash
38
+ saf install {{ cookiecutter.__solution_name }}
39
+ ```
40
+
41
+ Check the [Install solution’s development environment](https://saf-cli.external.solutions.ansys.com/version/stable/user_guide/install_solution_environment.html) section of the SAF CLI documentation for more options.
42
+
43
+ # Start the solution
44
+
45
+ To start the solution run the following command anywhere in the system:
46
+
47
+ ```bash
48
+ saf run {{ cookiecutter.__solution_name }}
49
+ ```
50
+
51
+ Check the [Run a solution](https://saf-cli.external.solutions.ansys.com/version/stable/user_guide/run.html) section of the SAF CLI documentation for more options.
52
+
53
+ # Generate a distributable desktop installer
54
+
55
+ To generate an executable installer from the solution application:
56
+
57
+ 1. Install the build dependencies:
58
+
59
+ ```bash
60
+ saf install {{ cookiecutter.__solution_name }} -d build
61
+ ```
62
+
63
+ 2. Run the ``saf build`` command:
64
+
65
+ ```bash
66
+ saf build {{ cookiecutter.__solution_name }}
67
+ ```
68
+
69
+ Check the [Build a distributable installer](https://saf-cli.external.solutions.ansys.com/version/stable/user_guide/installer.html) section of the SAF CLI documentation for more options.
@@ -0,0 +1,43 @@
1
+ # === Base Stage ==================================================================================
2
+
3
+ FROM python:3.12-slim AS base
4
+
5
+ RUN apt update && apt install curl libx11-6 libglu1-mesa-dev libxrender1 libgl1 libglx-mesa0 xvfb iputils-ping tk libicu-dev -y
6
+ RUN pip install --upgrade pip && pip install poetry==2.3.2
7
+
8
+ WORKDIR /app
9
+
10
+ COPY ../../pyproject.toml ../../poetry.lock /app/
11
+ COPY README.md /app/
12
+
13
+ RUN mkdir -p /app/src/{{ cookiecutter.__solution_namespace_path }}/{{ cookiecutter.__solution_module_name }}
14
+ RUN touch /app/src/{{ cookiecutter.__solution_namespace_path }}/{{ cookiecutter.__solution_module_name }}/__init__.py
15
+
16
+ RUN poetry install
17
+
18
+ COPY ../../minerva /usr/local/share/minerva
19
+
20
+ RUN rm -rf /root/.cache/pip/* /dist /var/lib/apt/lists/*
21
+
22
+ # === API Stage ===================================================================================
23
+
24
+ FROM base AS solution_api
25
+
26
+ COPY ../../src/{{ cookiecutter.__solution_namespace_path }}/{{ cookiecutter.__solution_module_name }}/ /app/src/{{ cookiecutter.__solution_namespace_path }}/{{ cookiecutter.__solution_module_name }}/
27
+
28
+ # Directory required by pyHPS
29
+ RUN mkdir -p /.ansys/hps
30
+ RUN chmod -R 777 /.ansys/hps
31
+
32
+ ENTRYPOINT poetry run python -m uvicorn ansys.saf.glow.api:app --host $GLOW_API_HOST --port $GLOW_API_PORT --root-path $GLOW_API_PATH_PREFIX --workers ${GLOW_API_NUMBER_OF_WORKERS:-8}
33
+
34
+ # === UI Stage ====================================================================================
35
+
36
+ FROM base AS solution_ui
37
+
38
+ RUN poetry install --only ui
39
+ RUN poetry run pip install waitress
40
+
41
+ COPY ../../src/{{ cookiecutter.__solution_namespace_path }}/{{ cookiecutter.__solution_module_name }}/ /app/src/{{ cookiecutter.__solution_namespace_path }}/{{ cookiecutter.__solution_module_name }}/
42
+
43
+ ENTRYPOINT poetry run python -m waitress --host $GLOW_UI_HOST --port $GLOW_UI_PORT --url-prefix $GLOW_UI_PATH_PREFIX ansys.saf.glow.ui:app
@@ -0,0 +1,13 @@
1
+ # Deployment Options
2
+
3
+ The solution template provides four different deployment options, each designed for specific use cases and environments. All deployments use Docker Compose for containerization.
4
+
5
+ ## Prerequisites for Container Deployments
6
+
7
+ | Prerequisite | Description |
8
+ |--------------|-------------|
9
+ | WSL (Windows only) | [WSL](https://learn.microsoft.com/en-us/windows/wsl/install) |
10
+ | Virtualization | [Docker Desktop](https://docs.docker.com/desktop/setup/install/windows-install/) (requires a license) or [Docker Engine](https://docs.docker.com/engine/install/) (open-source) |
11
+ | Environment variables | Set `MACHINE_IP` with the IP address of your machine if you use Docker Desktop or the IP address of your WSL if you use WSL |
12
+
13
+ Find more information about each deployment in the [Server-to-server deployments section](https://saf-cli.docs.solutions.ansys.com/version/stable/user_guide/solution_s2s_deployment.html) of the saf-cli documentation.
@@ -0,0 +1,27 @@
1
+ ACCESS_URL=solutions.${DOMAIN_NAME}
2
+ APP_IMAGE_VERSION=main
3
+ DATABASE_LOCATION={{ cookiecutter.__appdata_directory }}/Ansys/portal/{{ cookiecutter.__solution_name }}
4
+ DOMAIN_NAME=
5
+ EXT_NETWORK_NAME=platform_default
6
+ GLOW_API_CONTAINER_PORT=8000
7
+ GLOW_API_PATH_PREFIX=/
8
+ # dotenv-linter:off QuoteCharacter
9
+ GLOW_CORS_ORIGINS=["*"]
10
+ # dotenv-linter:on QuoteCharacter
11
+ GLOW_API_NUMBER_OF_WORKERS=8
12
+ GLOW_DEPLOYMENT=DockerCompose
13
+ GLOW_HPS_HOST=hps.${DOMAIN_NAME}
14
+ GLOW_HPS_PASSWORD=repadmin
15
+ GLOW_HPS_PORT=${TRAEFIK_PORT}
16
+ GLOW_HPS_USERNAME=repadmin
17
+ GLOW_PRODUCT_INSTANCE_SYSTEM=HPS
18
+ GLOW_PROJECTS_DIR_SOLUTION=./data/projects
19
+ GLOW_SOLUTION_DEFINITION={{ cookiecutter.__solution_namespace }}.{{ cookiecutter.__solution_module_name }}.solution.definition
20
+ GLOW_TRANSACTIONS_DIR_SOLUTION=./data/transactions
21
+ GLOW_UI_CONTAINER_PORT=8001
22
+ GLOW_UI_MODULE={{ cookiecutter.__solution_namespace }}.{{ cookiecutter.__solution_module_name }}.ui.app
23
+ GLOW_UI_PATH_PREFIX=/
24
+ OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318
25
+ PORTAL_DATABASE_TYPE=postgres
26
+ PORTAL_PROJECT_DATABASE_LOCATION=${DATABASE_LOCATION}/projects.db
27
+ TRAEFIK_PORT=8443
@@ -0,0 +1,132 @@
1
+ name: {{ cookiecutter.__docker_name }}
2
+
3
+ networks:
4
+ {{ cookiecutter.__docker_name }}-internal:
5
+ internal: true
6
+ {{ cookiecutter.__docker_name }}-external:
7
+ driver: bridge
8
+ external-network:
9
+ external: true
10
+ name: ${EXT_NETWORK_NAME}
11
+
12
+ services:
13
+ {{ cookiecutter.__docker_name }}-postgresql:
14
+ image: postgres:16.0
15
+ networks:
16
+ - {{ cookiecutter.__docker_name }}-internal
17
+ environment:
18
+ - POSTGRES_USER=glow
19
+ - POSTGRES_PASSWORD=glow
20
+ healthcheck:
21
+ test: [ "CMD", "pg_isready", "-U", "glow" ]
22
+ interval: 5s
23
+ retries: 20
24
+ volumes:
25
+ - {{ cookiecutter.__docker_name }}-database:/var/lib/postgresql/data
26
+
27
+ {{ cookiecutter.__docker_name }}-api:
28
+ image: {{ cookiecutter.__docker_name }}-api
29
+ build:
30
+ context: ../../
31
+ dockerfile: deployments/Dockerfile
32
+ target: solution_api
33
+ args:
34
+ EXTRAS: "hps"
35
+ depends_on:
36
+ {{ cookiecutter.__docker_name }}-postgresql:
37
+ condition: service_healthy
38
+ networks:
39
+ - {{ cookiecutter.__docker_name }}-external
40
+ - {{ cookiecutter.__docker_name }}-internal
41
+ - external-network
42
+ env_file:
43
+ - .env
44
+ init: true # to ensure reaping of killed child processes left by long-running transactions
45
+ environment:
46
+ - GLOW_DEPLOYMENT=DockerCompose
47
+ - GLOW_API_HOST=0.0.0.0
48
+ - GLOW_API_PORT=50000
49
+ - GLOW_DATABASE_TYPE=postgresql
50
+ - GLOW_DATABASE_LOCATION=postgresql://glow:glow@{{ cookiecutter.__docker_name }}-postgresql:5432
51
+ - GLOW_PROJECT_FILES_DIRECTORY=/projects
52
+ - GLOW_METHOD_EXECUTION_DIRECTORY=/transactions
53
+ - GLOW_EXTERNAL_API_URL=https://${ACCESS_URL}:${TRAEFIK_PORT}/{{ cookiecutter.__docker_name }}/api
54
+ - OTEL_EXPORTER_OTLP_ENDPOINT=${OTEL_EXPORTER_OTLP_ENDPOINT}
55
+ healthcheck:
56
+ test: [ "CMD", "curl", "-f", "http://localhost:50000/health" ]
57
+ interval: 5s
58
+ retries: 20
59
+ volumes:
60
+ - ${GLOW_PROJECTS_DIR_SOLUTION}:/projects
61
+ - ${GLOW_TRANSACTIONS_DIR_SOLUTION}:/transactions
62
+ - /etc/hosts:/etc/hosts:ro
63
+ labels:
64
+ - "traefik.enable=true"
65
+ - "traefik.http.routers.{{ cookiecutter.__docker_name }}-api.rule=Host(`${ACCESS_URL}`) && PathPrefix(`/{{ cookiecutter.__docker_name }}/api`)"
66
+ - "traefik.http.routers.{{ cookiecutter.__docker_name }}-api.entrypoints=web,external"
67
+ - "traefik.http.middlewares.{{ cookiecutter.__docker_name }}-api-stripprefix.stripprefix.prefixes=/{{ cookiecutter.__docker_name }}/api"
68
+ - "traefik.http.routers.{{ cookiecutter.__docker_name }}-api.middlewares={{ cookiecutter.__docker_name }}-api-stripprefix"
69
+ - "traefik.http.routers.{{ cookiecutter.__docker_name }}-api.service={{ cookiecutter.__docker_name }}-api"
70
+ - "traefik.http.services.{{ cookiecutter.__docker_name }}-api.loadbalancer.server.port=50000"
71
+ - "traefik.http.routers.{{ cookiecutter.__docker_name }}-api.tls=true"
72
+ - "traefik.docker.network=${EXT_NETWORK_NAME}"
73
+ - "traefik.http.routers.{{ cookiecutter.__docker_name }}-api.middlewares={{ cookiecutter.__docker_name }}-api-stripprefix,oauth-signin,oauth-verify,secure-and-gzip@file"
74
+ develop:
75
+ watch:
76
+ - action: sync+restart
77
+ path: /src/{{ cookiecutter.__solution_namespace_path }}/{{ cookiecutter.__solution_module_name }}/solution
78
+ target: /app/src/{{ cookiecutter.__solution_namespace_path }}/{{ cookiecutter.__solution_module_name }}/solution
79
+
80
+ {% if cookiecutter.__ui_framework != "none" %}
81
+
82
+ {{ cookiecutter.__docker_name }}-ui:
83
+ image: {{ cookiecutter.__docker_name }}-ui
84
+ build:
85
+ context: ../../
86
+ dockerfile: deployments/Dockerfile
87
+ target: solution_ui
88
+ args:
89
+ EXTRAS: "hps"
90
+ depends_on:
91
+ {{ cookiecutter.__docker_name }}-api:
92
+ condition: service_healthy
93
+ networks:
94
+ - {{ cookiecutter.__docker_name }}-external
95
+ - external-network
96
+ env_file:
97
+ - .env
98
+ environment:
99
+ - GLOW_DEPLOYMENT=DockerCompose
100
+ - GLOW_UI_HOST=0.0.0.0
101
+ - GLOW_UI_PORT=50001
102
+ - GLOW_API_URL=http://{{ cookiecutter.__docker_name }}-api:50000
103
+ - GLOW_UI_PROJECT_FILES_DIRECTORY=/projects
104
+ - GLOW_WS_EVENTS_ADDR=wss://${ACCESS_URL}:${TRAEFIK_PORT}/{{ cookiecutter.__docker_name }}/api
105
+ - GLOW_EXTERNAL_API_URL=https://${ACCESS_URL}:${TRAEFIK_PORT}/{{ cookiecutter.__docker_name }}/api
106
+ - GLOW_PORTAL_URL=https://portal.${DOMAIN_NAME}:${TRAEFIK_PORT}
107
+ healthcheck:
108
+ test: [ "CMD", "curl", "-f", "http://localhost:50001/health" ]
109
+ interval: 5s
110
+ retries: 20
111
+ volumes:
112
+ - ${GLOW_PROJECTS_DIR_SOLUTION}:/projects
113
+ - /etc/hosts:/etc/hosts:ro
114
+ labels:
115
+ - "traefik.enable=true"
116
+ - "traefik.http.routers.{{ cookiecutter.__docker_name }}-ui.rule=Host(`${ACCESS_URL}`) && PathPrefix(`/{{ cookiecutter.__docker_name }}`)"
117
+ - "traefik.http.routers.{{ cookiecutter.__docker_name }}-ui.entrypoints=external"
118
+ - "traefik.http.routers.{{ cookiecutter.__docker_name }}-ui.service={{ cookiecutter.__docker_name }}-ui"
119
+ - "traefik.http.services.{{ cookiecutter.__docker_name }}-ui.loadbalancer.server.port=50001"
120
+ - "traefik.http.routers.{{ cookiecutter.__docker_name }}-ui.tls=true"
121
+ - "traefik.docker.network=${EXT_NETWORK_NAME}"
122
+ - "traefik.http.routers.{{ cookiecutter.__docker_name }}-ui.middlewares=oauth-signin,oauth-verify,secure-and-gzip@file"
123
+ develop:
124
+ watch:
125
+ - action: sync+restart
126
+ path: /src/{{ cookiecutter.__solution_namespace_path }}/{{ cookiecutter.__solution_module_name }}/ui
127
+ target: /app/src/{{ cookiecutter.__solution_namespace_path }}/{{ cookiecutter.__solution_module_name }}/ui
128
+
129
+ {% endif %}
130
+
131
+ volumes:
132
+ {{ cookiecutter.__docker_name }}-database:
@@ -0,0 +1,20 @@
1
+ APP_IMAGE_VERSION=main
2
+ DATABASE_LOCATION={{ cookiecutter.__appdata_directory }}/Ansys/portal/{{ cookiecutter.__solution_name }}
3
+ GLOW_API_CONTAINER_PORT=8000
4
+ GLOW_API_PATH_PREFIX=/
5
+ # dotenv-linter:off QuoteCharacter
6
+ GLOW_CORS_ORIGINS=["*"]
7
+ # dotenv-linter:on QuoteCharacter
8
+ GLOW_API_NUMBER_OF_WORKERS=8
9
+ GLOW_DEPLOYMENT=DockerCompose
10
+ GLOW_PROJECTS_DIR_SOLUTION=./data/projects
11
+ GLOW_SOLUTION_DEFINITION={{ cookiecutter.__solution_namespace }}.{{ cookiecutter.__solution_module_name }}.solution.definition
12
+ GLOW_TRANSACTIONS_DIR_SOLUTION=./data/transactions
13
+ GLOW_UI_CONTAINER_PORT=8001
14
+ GLOW_UI_MODULE={{ cookiecutter.__solution_namespace }}.{{ cookiecutter.__solution_module_name }}.ui.app
15
+ GLOW_UI_PATH_PREFIX=/
16
+ OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-dashboard:18890
17
+ # !!! Important !!! Change the following value and its reference in the compose.yaml to ensure secure connection with Aspire
18
+ OTEL_EXPORTER_OTLP_HEADERS="x-otlp-api-key=YOU_MUST_GENERATE_A_RANDOM_STRING_AND_REPLACE_THIS"
19
+ PORTAL_DATABASE_TYPE=sqlite
20
+ PORTAL_PROJECT_DATABASE_LOCATION=${DATABASE_LOCATION}/projects.db
@@ -0,0 +1,118 @@
1
+ name: {{ cookiecutter.__docker_name }}
2
+
3
+ networks:
4
+ {{ cookiecutter.__docker_name }}-internal:
5
+ internal: true
6
+ {{ cookiecutter.__docker_name }}-external:
7
+ driver: bridge
8
+
9
+ services:
10
+ {{ cookiecutter.__docker_name }}-postgresql:
11
+ image: postgres:16.0
12
+ networks:
13
+ - {{ cookiecutter.__docker_name }}-internal
14
+ environment:
15
+ - POSTGRES_USER=glow
16
+ - POSTGRES_PASSWORD=glow
17
+ healthcheck:
18
+ test: [ "CMD", "pg_isready", "-U", "glow" ]
19
+ interval: 5s
20
+ retries: 20
21
+ volumes:
22
+ - {{ cookiecutter.__docker_name }}-database:/var/lib/postgresql/data
23
+
24
+ {{ cookiecutter.__docker_name }}-api:
25
+ image: {{ cookiecutter.__docker_name }}-api
26
+ build:
27
+ context: ../../
28
+ dockerfile: deployments/Dockerfile
29
+ target: solution_api
30
+ depends_on:
31
+ {{ cookiecutter.__docker_name }}-postgresql:
32
+ condition: service_healthy
33
+ networks:
34
+ - {{ cookiecutter.__docker_name }}-external
35
+ - {{ cookiecutter.__docker_name }}-internal
36
+ env_file:
37
+ - .env
38
+ init: true # to ensure reaping of killed child processes left by long-running transactions
39
+ environment:
40
+ - GLOW_API_HOST=0.0.0.0
41
+ - GLOW_API_PORT=50000
42
+ - GLOW_DATABASE_TYPE=postgresql
43
+ - GLOW_DATABASE_LOCATION=postgresql://glow:glow@{{ cookiecutter.__docker_name }}-postgresql:5432
44
+ - GLOW_PROJECT_FILES_DIRECTORY=/projects
45
+ - GLOW_METHOD_EXECUTION_DIRECTORY=/transactions
46
+ - GLOW_EXTERNAL_API_URL=http://127.0.0.1:${GLOW_API_CONTAINER_PORT}
47
+ - OTEL_EXPORTER_OTLP_ENDPOINT=${OTEL_EXPORTER_OTLP_ENDPOINT}
48
+ ports:
49
+ - ${GLOW_API_CONTAINER_PORT}:50000
50
+ healthcheck:
51
+ test: [ "CMD", "curl", "-f", "http://localhost:50000/health" ]
52
+ interval: 5s
53
+ retries: 20
54
+ volumes:
55
+ - ${GLOW_PROJECTS_DIR_SOLUTION}:/projects
56
+ - ${GLOW_TRANSACTIONS_DIR_SOLUTION}:/transactions
57
+ develop:
58
+ watch:
59
+ - action: sync+restart
60
+ path: /src/{{ cookiecutter.__solution_namespace_path }}/{{ cookiecutter.__solution_module_name }}/solution
61
+ target: /app/src/{{ cookiecutter.__solution_namespace_path }}/{{ cookiecutter.__solution_module_name }}/solution
62
+
63
+ {% if cookiecutter.__ui_framework != "none" %}
64
+
65
+ {{ cookiecutter.__docker_name }}-ui:
66
+ image: {{ cookiecutter.__docker_name }}-ui
67
+ build:
68
+ context: ../../
69
+ dockerfile: deployments/Dockerfile
70
+ target: solution_ui
71
+ depends_on:
72
+ {{ cookiecutter.__docker_name }}-api:
73
+ condition: service_healthy
74
+ networks:
75
+ - {{ cookiecutter.__docker_name }}-external
76
+ env_file:
77
+ - .env
78
+ environment:
79
+ - GLOW_DEPLOYMENT=DockerCompose
80
+ - GLOW_UI_HOST=0.0.0.0
81
+ - GLOW_UI_PORT=50001
82
+ - GLOW_API_URL=http://{{ cookiecutter.__docker_name }}-api:50000
83
+ - GLOW_UI_PROJECT_FILES_DIRECTORY=/projects
84
+ - GLOW_WS_EVENTS_ADDR=127.0.0.1:${GLOW_API_CONTAINER_PORT}
85
+ - GLOW_EXTERNAL_API_URL=http://127.0.0.1:${GLOW_API_CONTAINER_PORT}
86
+ ports:
87
+ - ${GLOW_UI_CONTAINER_PORT}:50001
88
+ healthcheck:
89
+ test: [ "CMD", "curl", "-f", "http://localhost:50001/health" ]
90
+ interval: 5s
91
+ retries: 20
92
+ volumes:
93
+ - ${GLOW_PROJECTS_DIR_SOLUTION}:/projects
94
+ develop:
95
+ watch:
96
+ - action: sync+restart
97
+ path: /src/{{ cookiecutter.__solution_namespace_path }}/{{ cookiecutter.__solution_module_name }}/ui
98
+ target: /app/src/{{ cookiecutter.__solution_namespace_path }}/{{ cookiecutter.__solution_module_name }}/ui
99
+
100
+ {% endif %}
101
+
102
+ otel-dashboard:
103
+ image: mcr.microsoft.com/dotnet/aspire-dashboard:9.1.0
104
+ ports:
105
+ - 18888:18888 # UI
106
+ - 18889:18889 # OTLP gRPC
107
+ - 18890:18890 # OTLP HTTP
108
+ environment:
109
+ - DASHBOARD__OTLP__AUTHMODE=ApiKey
110
+ # !!! Important !!! For production, replace the following env var with secure values
111
+ # as described here: https://aspire.dev/dashboard/security-considerations/
112
+ - DASHBOARD__FRONTEND__AUTHMODE=Unsecured
113
+ - DASHBOARD__OTLP__PRIMARYAPIKEY=YOU_MUST_GENERATE_A_RANDOM_STRING_AND_REPLACE_THIS
114
+ networks:
115
+ - {{ cookiecutter.__docker_name }}-external
116
+
117
+ volumes:
118
+ {{ cookiecutter.__docker_name }}-database:
@@ -0,0 +1,28 @@
1
+ ACCESS_URL=${MACHINE_IP}
2
+ APP_IMAGE_VERSION=main
3
+ ASSETS_MOUNT=src/{{ cookiecutter.__solution_namespace_path }}/{{ cookiecutter.__solution_name }}/solution/method_assets/Optimization
4
+ DATABASE_LOCATION={{ cookiecutter.__appdata_directory }}/Ansys/portal/{{ cookiecutter.__solution_name }}
5
+ EXT_NETWORK_NAME=ansys-hps_default
6
+ GLOW_API_CONTAINER_PORT=8000
7
+ GLOW_API_PATH_PREFIX=/
8
+ # dotenv-linter:off QuoteCharacter
9
+ GLOW_CORS_ORIGINS=["*"]
10
+ # dotenv-linter:off QuoteCharacter
11
+ GLOW_API_NUMBER_OF_WORKERS=8
12
+ GLOW_DEPLOYMENT=DockerCompose
13
+ GLOW_HPS_HOST=${MACHINE_IP}
14
+ GLOW_HPS_PASSWORD=repadmin
15
+ GLOW_HPS_PORT=8443
16
+ GLOW_HPS_USERNAME=repadmin
17
+ GLOW_PRODUCT_INSTANCE_SYSTEM=HPS
18
+ GLOW_PROJECTS_DIR_SOLUTION=./data/projects
19
+ GLOW_SOLUTION_DEFINITION={{ cookiecutter.__solution_namespace }}.{{ cookiecutter.__solution_module_name }}.solution.definition
20
+ GLOW_TRANSACTIONS_DIR_SOLUTION=./data/transactions
21
+ GLOW_UI_CONTAINER_PORT=8001
22
+ GLOW_UI_MODULE={{ cookiecutter.__solution_namespace }}.{{ cookiecutter.__solution_module_name }}.ui.app
23
+ GLOW_UI_PATH_PREFIX=/
24
+ OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-dashboard:18890
25
+ # !!! Important !!! Change the following value and its reference in the compose.yaml to ensure secure connection with Aspire
26
+ OTEL_EXPORTER_OTLP_HEADERS="x-otlp-api-key=YOU_MUST_GENERATE_A_RANDOM_STRING_AND_REPLACE_THIS"
27
+ PORTAL_DATABASE_TYPE=sqlite
28
+ PORTAL_PROJECT_DATABASE_LOCATION=${DATABASE_LOCATION}/projects.db
@@ -0,0 +1,146 @@
1
+ name: {{ cookiecutter.__docker_name }}
2
+
3
+ networks:
4
+ {{ cookiecutter.__docker_name }}-internal:
5
+ internal: true
6
+ {{ cookiecutter.__docker_name }}-external:
7
+ driver: bridge
8
+ external-network:
9
+ external: true
10
+ name: ${EXT_NETWORK_NAME}
11
+
12
+ services:
13
+ {{ cookiecutter.__docker_name }}-postgresql:
14
+ image: postgres:16.0
15
+ networks:
16
+ - {{ cookiecutter.__docker_name }}-internal
17
+ environment:
18
+ - POSTGRES_USER=glow
19
+ - POSTGRES_PASSWORD=glow
20
+ healthcheck:
21
+ test: [ "CMD", "pg_isready", "-U", "glow" ]
22
+ interval: 5s
23
+ retries: 20
24
+ volumes:
25
+ - {{ cookiecutter.__docker_name }}-database:/var/lib/postgresql/data
26
+
27
+ {{ cookiecutter.__docker_name }}-api:
28
+ image: {{ cookiecutter.__docker_name }}-api
29
+ build:
30
+ context: ../../
31
+ dockerfile: deployments/Dockerfile
32
+ target: solution_api
33
+ depends_on:
34
+ {{ cookiecutter.__docker_name }}-postgresql:
35
+ condition: service_healthy
36
+ networks:
37
+ - {{ cookiecutter.__docker_name }}-external
38
+ - {{ cookiecutter.__docker_name }}-internal
39
+ - external-network
40
+ extra_hosts:
41
+ - "host.docker.internal:host-gateway"
42
+ env_file:
43
+ - .env
44
+ init: true # to ensure reaping of killed child processes left by long-running transactions
45
+ environment:
46
+ - GLOW_DEPLOYMENT=DockerCompose
47
+ - GLOW_API_HOST=0.0.0.0
48
+ - GLOW_API_PORT=50000
49
+ - GLOW_DATABASE_TYPE=postgresql
50
+ - GLOW_DATABASE_LOCATION=postgresql://glow:glow@{{ cookiecutter.__docker_name }}-postgresql:5432
51
+ - GLOW_PROJECT_FILES_DIRECTORY=/projects
52
+ - GLOW_METHOD_EXECUTION_DIRECTORY=/transactions
53
+ - GLOW_EXTERNAL_API_URL=http://127.0.0.1:${GLOW_API_CONTAINER_PORT}
54
+ - OTEL_EXPORTER_OTLP_ENDPOINT=${OTEL_EXPORTER_OTLP_ENDPOINT}
55
+ ports:
56
+ - ${GLOW_API_CONTAINER_PORT}:50000
57
+ healthcheck:
58
+ test: [ "CMD", "curl", "-f", "http://localhost:50000/health" ]
59
+ interval: 5s
60
+ retries: 20
61
+ volumes:
62
+ - ${GLOW_PROJECTS_DIR_SOLUTION}:/projects
63
+ - ${GLOW_TRANSACTIONS_DIR_SOLUTION}:/transactions
64
+ labels:
65
+ - "traefik.enable=true"
66
+ - "traefik.http.routers.{{ cookiecutter.__docker_name }}-api.rule=Host(`${ACCESS_URL}`) && PathPrefix(`/api`)"
67
+ - "traefik.http.routers.{{ cookiecutter.__docker_name }}-api.entrypoints=web,external"
68
+ - "traefik.http.middlewares.{{ cookiecutter.__docker_name }}-api-stripprefix.stripprefix.prefixes=/api"
69
+ - "traefik.http.routers.{{ cookiecutter.__docker_name }}-api.middlewares={{ cookiecutter.__docker_name }}-api-stripprefix"
70
+ - "traefik.http.routers.{{ cookiecutter.__docker_name }}-api.service={{ cookiecutter.__docker_name }}-api"
71
+ - "traefik.http.services.{{ cookiecutter.__docker_name }}-api.loadbalancer.server.port=50000"
72
+ - "traefik.http.routers.{{ cookiecutter.__docker_name }}-api.tls=true"
73
+ - "traefik.docker.network=${EXT_NETWORK_NAME}"
74
+ develop:
75
+ watch:
76
+ - action: sync+restart
77
+ path: /src/{{ cookiecutter.__solution_namespace_path }}/{{ cookiecutter.__solution_module_name }}/solution
78
+ target: /app/src/{{ cookiecutter.__solution_namespace_path }}/{{ cookiecutter.__solution_module_name }}/solution
79
+
80
+ {% if cookiecutter.__ui_framework != "none" %}
81
+
82
+ {{ cookiecutter.__docker_name }}-ui:
83
+ image: {{ cookiecutter.__docker_name }}-ui
84
+ build:
85
+ context: ../../
86
+ dockerfile: deployments/Dockerfile
87
+ target: solution_ui
88
+ depends_on:
89
+ {{ cookiecutter.__docker_name }}-api:
90
+ condition: service_healthy
91
+ networks:
92
+ - {{ cookiecutter.__docker_name }}-external
93
+ - external-network
94
+ env_file:
95
+ - .env
96
+ environment:
97
+ - GLOW_DEPLOYMENT=DockerCompose
98
+ - GLOW_UI_HOST=0.0.0.0
99
+ - GLOW_UI_PORT=50001
100
+ - GLOW_API_URL=http://{{ cookiecutter.__docker_name }}-api:50000
101
+ - GLOW_UI_PROJECT_FILES_DIRECTORY=/projects
102
+ - GLOW_WS_EVENTS_ADDR=127.0.0.1:${GLOW_API_CONTAINER_PORT}
103
+ - GLOW_EXTERNAL_API_URL=http://127.0.0.1:${GLOW_API_CONTAINER_PORT}
104
+ ports:
105
+ - ${GLOW_UI_CONTAINER_PORT}:50001
106
+ healthcheck:
107
+ test: [ "CMD", "curl", "-f", "http://localhost:50001/health" ]
108
+ interval: 5s
109
+ retries: 20
110
+ volumes:
111
+ - ${GLOW_PROJECTS_DIR_SOLUTION}:/projects
112
+ labels:
113
+ - "traefik.enable=true"
114
+ - "traefik.http.routers.{{ cookiecutter.__docker_name }}-ui.rule=Host(`${ACCESS_URL}`) && PathPrefix(`/`)"
115
+ - "traefik.http.routers.{{ cookiecutter.__docker_name }}-ui.entrypoints=web,external"
116
+ - "traefik.http.routers.{{ cookiecutter.__docker_name }}-ui.service={{ cookiecutter.__docker_name }}-ui"
117
+ - "traefik.http.services.{{ cookiecutter.__docker_name }}-ui.loadbalancer.server.port=50001"
118
+ - "traefik.http.routers.{{ cookiecutter.__docker_name }}-ui.tls=true"
119
+ - "traefik.docker.network=${EXT_NETWORK_NAME}"
120
+
121
+ develop:
122
+ watch:
123
+ - action: sync+restart
124
+ path: /src/{{ cookiecutter.__solution_namespace_path }}/{{ cookiecutter.__solution_module_name }}/ui
125
+ target: /app/src/{{ cookiecutter.__solution_namespace_path }}/{{ cookiecutter.__solution_module_name }}/ui
126
+
127
+ {% endif %}
128
+
129
+ otel-dashboard:
130
+ image: mcr.microsoft.com/dotnet/aspire-dashboard:9.1.0
131
+ ports:
132
+ - 18888:18888 # UI
133
+ - 18889:18889 # OTLP gRPC
134
+ - 18890:18890 # OTLP HTTP
135
+ environment:
136
+ - DASHBOARD__OTLP__AUTHMODE=ApiKey
137
+ # !!! Important !!! For production, replace the following env var with secure values
138
+ # as described here: https://aspire.dev/dashboard/security-considerations/
139
+ - DASHBOARD__FRONTEND__AUTHMODE=Unsecured
140
+ - DASHBOARD__OTLP__PRIMARYAPIKEY=YOU_MUST_GENERATE_A_RANDOM_STRING_AND_REPLACE_THIS
141
+ networks:
142
+ - {{ cookiecutter.__docker_name }}-external
143
+ - external-network
144
+
145
+ volumes:
146
+ {{ cookiecutter.__docker_name }}-database:
@@ -0,0 +1,25 @@
1
+ ANS_MINERVA_AUTH__DATABASE=
2
+ ANS_MINERVA_AUTH__PASSWORD=
3
+ ANS_MINERVA_AUTH__USER=
4
+ ANS_MINERVA_URL=
5
+ APP_IMAGE_VERSION=main
6
+ DATABASE_LOCATION={{ cookiecutter.__appdata_directory }}/Ansys/portal/{{ cookiecutter.__solution_name }}
7
+ GLOW_API_CONTAINER_PORT=8000
8
+ GLOW_API_PATH_PREFIX=/
9
+ # dotenv-linter:off QuoteCharacter
10
+ GLOW_CORS_ORIGINS=["*"]
11
+ # dotenv-linter:on QuoteCharacter
12
+ GLOW_API_NUMBER_OF_WORKERS=8
13
+ GLOW_DATA_REPOSITORY_UPLOAD_ROOT=/Data/SAF/
14
+ GLOW_DEPLOYMENT=DockerCompose
15
+ GLOW_PROJECTS_DIR_SOLUTION=./data/projects
16
+ GLOW_SOLUTION_DEFINITION={{ cookiecutter.__solution_namespace }}.{{ cookiecutter.__solution_module_name }}.solution.definition
17
+ GLOW_TRANSACTIONS_DIR_SOLUTION=./data/transactions
18
+ GLOW_UI_CONTAINER_PORT=8001
19
+ GLOW_UI_MODULE={{ cookiecutter.__solution_namespace }}.{{ cookiecutter.__solution_module_name }}.ui.app
20
+ GLOW_UI_PATH_PREFIX=/
21
+ OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-dashboard:18890
22
+ # !!! Important !!! Change the following value and its reference in the compose.yaml to ensure secure connection with Aspire
23
+ OTEL_EXPORTER_OTLP_HEADERS="x-otlp-api-key=YOU_MUST_GENERATE_A_RANDOM_STRING_AND_REPLACE_THIS"
24
+ PORTAL_DATABASE_TYPE=sqlite
25
+ PORTAL_PROJECT_DATABASE_LOCATION=${DATABASE_LOCATION}/projects.db