@vaharoni/devops 1.2.13 → 1.2.14

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 (323) hide show
  1. package/dist/chunk-N7EX3HJH.js +139 -0
  2. package/dist/chunk-RZ46YYZZ.js +420 -0
  3. package/dist/chunk-WKP7EQNU.js +421 -0
  4. package/dist/devops.d.ts +0 -2
  5. package/dist/devops.js +3235 -91
  6. package/dist/index.d.ts +972 -4
  7. package/dist/index.js +67 -3
  8. package/dist/plugins.d.ts +95 -4
  9. package/dist/plugins.js +20 -6
  10. package/dist/src/target-templates/README.md +1 -0
  11. package/dist/src/target-templates/cluster-resource-options/README.md +2 -0
  12. package/dist/src/target-templates/cluster-resource-options/dns-test/dns-test.yaml +60 -0
  13. package/dist/src/target-templates/cluster-resource-options/milvus/production/milvus-values.yaml +2 -0
  14. package/dist/src/target-templates/cluster-resource-options/milvus/staging/milvus-values.yaml +2 -0
  15. package/dist/src/target-templates/cluster-resource-options/monitoring-ingress/monitoring-ingress.yaml +62 -0
  16. package/dist/src/target-templates/cluster-resource-options/postgres/daily-operator-restart.yaml +54 -0
  17. package/dist/src/target-templates/cluster-resource-options/postgres/production/cluster/PodDisruptionBudget.yaml +27 -0
  18. package/dist/src/target-templates/cluster-resource-options/postgres/production/cluster/SGCluster.yaml +47 -0
  19. package/dist/src/target-templates/cluster-resource-options/postgres/production/cluster/StackGres-alerts.yaml +191 -0
  20. package/dist/src/target-templates/cluster-resource-options/postgres/production/configurations/06-SGDistributedLogs.yaml +11 -0
  21. package/dist/src/target-templates/cluster-resource-options/postgres/production/configurations/07-SGObjectStorage.yaml +18 -0
  22. package/dist/src/target-templates/cluster-resource-options/postgres/production/configurations/08-SGScript.yaml +12 -0
  23. package/dist/src/target-templates/cluster-resource-options/postgres/stackgres-ui-ingress.yaml +35 -0
  24. package/dist/src/target-templates/cluster-resource-options/postgres/staging/cluster/SGCluster.yaml +42 -0
  25. package/dist/src/target-templates/cluster-resource-options/postgres/staging/configurations/07-SGObjectStorage.yaml +18 -0
  26. package/dist/src/target-templates/cluster-resource-options/postgres/staging/configurations/08-SGScript.yaml +12 -0
  27. package/dist/src/target-templates/cluster-resource-options/prefect/production/prefect-values.yaml +14 -0
  28. package/dist/src/target-templates/cluster-resource-options/prefect/staging/prefect-values.yaml +14 -0
  29. package/dist/src/target-templates/cluster-resource-options/redis/production/redis-values.yaml +20 -0
  30. package/dist/src/target-templates/cluster-resource-options/redis/staging/redis-values.yaml +8 -0
  31. package/dist/src/target-templates/infra-variants/README.md +2 -0
  32. package/dist/src/target-templates/infra-variants/digitalocean/.devops/config/constants.yaml +18 -0
  33. package/dist/src/target-templates/infra-variants/digitalocean/.github/workflows/k8s-build.yaml +91 -0
  34. package/dist/src/target-templates/infra-variants/gcloud/.devops/config/constants.yaml +15 -0
  35. package/dist/src/target-templates/infra-variants/gcloud/.devops/manifests/ingress.yaml.hb +22 -0
  36. package/dist/src/target-templates/infra-variants/gcloud/.github/workflows/k8s-build.yaml +95 -0
  37. package/dist/src/target-templates/infra-variants/hetzner/.devops/config/constants.yaml +18 -0
  38. package/dist/src/target-templates/infra-variants/hetzner/.devops/infra/hetzner/abandoned/harbor-values.yaml +30 -0
  39. package/dist/src/target-templates/infra-variants/hetzner/.devops/infra/hetzner/abandoned/hcloud-config.yaml +134 -0
  40. package/dist/src/target-templates/infra-variants/hetzner/.devops/infra/hetzner/cert-manager.yaml +25 -0
  41. package/dist/src/target-templates/infra-variants/hetzner/.devops/infra/hetzner/harbor-cert.yaml +13 -0
  42. package/dist/src/target-templates/infra-variants/hetzner/.devops/infra/hetzner/harbor-values.yaml +76 -0
  43. package/dist/src/target-templates/infra-variants/hetzner/.devops/infra/hetzner/hcloud-config.yaml +113 -0
  44. package/dist/src/target-templates/infra-variants/hetzner/.devops/infra/hetzner/ingress-nginx-annotations.yaml +49 -0
  45. package/dist/src/target-templates/infra-variants/hetzner/.devops/infra/hetzner/ingress-nginx-configmap.yaml +8 -0
  46. package/dist/src/target-templates/infra-variants/hetzner/.devops/infra/hetzner/retain-storage-class.yaml +8 -0
  47. package/dist/src/target-templates/infra-variants/hetzner/.github/workflows/k8s-build.yaml +93 -0
  48. package/dist/src/target-templates/lang-variants-common/README.md +4 -0
  49. package/dist/src/target-templates/lang-variants-common/python/.cursor/rules/monorepo-python.mdc +56 -0
  50. package/dist/src/target-templates/lang-variants-common/python/.devops/config/images.yaml +89 -0
  51. package/dist/src/target-templates/lang-variants-common/python/.devops/docker-images/python-services/python-exec.sh +8 -0
  52. package/dist/src/target-templates/lang-variants-common/python/.devops/docker-images/python-services/python-run.sh +8 -0
  53. package/dist/src/target-templates/lang-variants-common/python/.devops/docker-images/python-services.Dockerfile +29 -0
  54. package/dist/src/target-templates/lang-variants-common/python/.devops/manifests/_index.yaml +21 -0
  55. package/dist/src/target-templates/lang-variants-common/python/.devops/manifests/prefect.yaml.hb +63 -0
  56. package/dist/src/target-templates/lang-variants-common/python/applications/example-data-pipeline/pyproject.toml +14 -0
  57. package/dist/src/target-templates/lang-variants-common/python/applications/example-data-pipeline/src/example_data_pipeline/main.py +38 -0
  58. package/dist/src/target-templates/lang-variants-common/python/applications/example-python/pyproject.toml +20 -0
  59. package/dist/src/target-templates/lang-variants-common/python/applications/example-python/src/example_python/__init__.py +0 -0
  60. package/dist/src/target-templates/lang-variants-common/python/applications/example-python/src/example_python/main.py +13 -0
  61. package/dist/src/target-templates/lang-variants-common/python/applications/example-python/src/example_python/scripts.py +17 -0
  62. package/dist/src/target-templates/lang-variants-common/python/applications/example-python/tests/__init__.py +0 -0
  63. package/dist/src/target-templates/lang-variants-common/python/devopspy +3 -0
  64. package/dist/src/target-templates/lang-variants-common/python/libs/example-python-lib/pyproject.toml +11 -0
  65. package/dist/src/target-templates/lang-variants-common/python/libs/example-python-lib/src/example_python_lib/__init__.py +2 -0
  66. package/dist/src/target-templates/lang-variants-common/python/pyproject.toml +16 -0
  67. package/dist/src/target-templates/lang-variants-common/typescript/.cursor/rules/monorepo-typescript.mdc +51 -0
  68. package/dist/src/target-templates/lang-variants-common/typescript/.devops/config/images.yaml +69 -0
  69. package/dist/src/target-templates/lang-variants-common/typescript/.devops/docker-images/cloudrun.Dockerfile +31 -0
  70. package/dist/src/target-templates/lang-variants-common/typescript/.devops/docker-images/common/docker-common.sh +23 -0
  71. package/dist/src/target-templates/lang-variants-common/typescript/.devops/docker-images/node-services/node-exec.sh +8 -0
  72. package/dist/src/target-templates/lang-variants-common/typescript/.devops/docker-images/node-services/node-run.sh +8 -0
  73. package/dist/src/target-templates/lang-variants-common/typescript/.devops/docker-images/node-services.Dockerfile +31 -0
  74. package/dist/src/target-templates/lang-variants-common/typescript/.devops/env.example.yaml +23 -0
  75. package/dist/src/target-templates/lang-variants-common/typescript/.devops/manifests/_index.yaml +19 -0
  76. package/dist/src/target-templates/lang-variants-common/typescript/.devops/manifests/cron-jobs.yaml.hb +56 -0
  77. package/dist/src/target-templates/lang-variants-common/typescript/.devops/manifests/db-migrate-job.yaml.hb +43 -0
  78. package/dist/src/target-templates/lang-variants-common/typescript/.devops/manifests/deployment-debug.yaml.hb +42 -0
  79. package/dist/src/target-templates/lang-variants-common/typescript/.devops/manifests/deployment-process.yaml.hb +48 -0
  80. package/dist/src/target-templates/lang-variants-common/typescript/.devops/manifests/deployment-web.yaml.hb +54 -0
  81. package/dist/src/target-templates/lang-variants-common/typescript/.devops/manifests/ingress.yaml.hb +21 -0
  82. package/dist/src/target-templates/lang-variants-common/typescript/.devops/manifests/service.yaml.hb +15 -0
  83. package/dist/src/target-templates/lang-variants-common/typescript/.envrc +5 -0
  84. package/dist/src/target-templates/lang-variants-common/typescript/.github/actions/build-image@v1/action.yaml +81 -0
  85. package/dist/src/target-templates/lang-variants-common/typescript/.github/actions/connect-to-digital-ocean@v1/action.yaml +29 -0
  86. package/dist/src/target-templates/lang-variants-common/typescript/.github/actions/connect-to-gke@v1/action.yaml +43 -0
  87. package/dist/src/target-templates/lang-variants-common/typescript/.github/actions/connect-to-hetzner@v1/action.yaml +31 -0
  88. package/dist/src/target-templates/lang-variants-common/typescript/.github/actions/db-migrate@v1/action.yaml +23 -0
  89. package/dist/src/target-templates/lang-variants-common/typescript/.github/actions/deploy-image-cloudrun@v1/action.yaml +71 -0
  90. package/dist/src/target-templates/lang-variants-common/typescript/.github/actions/deploy-image-k8s@v1/action.yaml +37 -0
  91. package/dist/src/target-templates/lang-variants-common/typescript/.github/actions/setup-prereq@v1/action.yaml +24 -0
  92. package/dist/src/target-templates/lang-variants-common/typescript/applications/example-node/index.ts +30 -0
  93. package/dist/src/target-templates/lang-variants-common/typescript/applications/example-node/package.json +26 -0
  94. package/dist/src/target-templates/lang-variants-common/typescript/applications/example-node/tsconfig.json +3 -0
  95. package/dist/src/target-templates/lang-variants-common/typescript/applications/jobs/README.md +68 -0
  96. package/dist/src/target-templates/lang-variants-common/typescript/applications/jobs/index.ts +1 -0
  97. package/dist/src/target-templates/lang-variants-common/typescript/applications/jobs/package.json +30 -0
  98. package/dist/src/target-templates/lang-variants-common/typescript/applications/jobs/tsconfig.json +3 -0
  99. package/dist/src/target-templates/lang-variants-common/typescript/config/.env.development +1 -0
  100. package/dist/src/target-templates/lang-variants-common/typescript/config/.env.global +4 -0
  101. package/dist/src/target-templates/lang-variants-common/typescript/config/.env.test +1 -0
  102. package/dist/src/target-templates/lang-variants-common/typescript/devops +3 -0
  103. package/dist/src/target-templates/lang-variants-common/typescript/libs/example-node-lib/index.ts +3 -0
  104. package/dist/src/target-templates/lang-variants-common/typescript/libs/example-node-lib/package.json +12 -0
  105. package/dist/src/target-templates/lang-variants-common/typescript/libs/example-node-lib/tsconfig.json +3 -0
  106. package/dist/src/target-templates/lang-variants-common/typescript/tmp/.gitkeep +0 -0
  107. package/dist/src/target-templates/lang-variants-common/typescript/tsconfig.json +27 -0
  108. package/dist/src/target-templates/lang-variants-prisma/README.md +3 -0
  109. package/dist/src/target-templates/lang-variants-prisma/python/.cursor/rules/prisma-python.mdc +55 -0
  110. package/dist/src/target-templates/lang-variants-prisma/python/.cursor/rules/testing-python.mdc +89 -0
  111. package/dist/src/target-templates/lang-variants-prisma/python/db/db/__init__.py +0 -0
  112. package/dist/src/target-templates/lang-variants-prisma/python/db/db/db_client_test.py +46 -0
  113. package/dist/src/target-templates/lang-variants-prisma/python/db/pyproject.toml +14 -0
  114. package/dist/src/target-templates/lang-variants-prisma/typescript/.cursor/rules/prisma-typescript.mdc +54 -0
  115. package/dist/src/target-templates/lang-variants-prisma/typescript/.cursor/rules/testing-typescript.mdc +103 -0
  116. package/dist/src/target-templates/lang-variants-prisma/typescript/db/db-client-test.ts +142 -0
  117. package/dist/src/target-templates/lang-variants-prisma/typescript/db/db-client.ts +19 -0
  118. package/dist/src/target-templates/lang-variants-prisma/typescript/db/env.yaml +4 -0
  119. package/dist/src/target-templates/lang-variants-prisma/typescript/db/package.json +17 -0
  120. package/dist/src/target-templates/lang-variants-prisma/typescript/db/prisma/schema.prisma +24 -0
  121. package/dist/src/target-templates/lang-variants-prisma/typescript/db/prisma-setup-vitest.ts +27 -0
  122. package/dist/src/target-templates/lang-variants-prisma/typescript/db/tsconfig.json +3 -0
  123. package/dist/src/target-templates/lang-variants-prisma/typescript/dml/package.json +7 -0
  124. package/dist/src/target-templates/lang-variants-prisma/typescript/dml/tsconfig.json +3 -0
  125. package/package.json +3 -2
  126. package/src/cli/core/exec.ts +2 -4
  127. package/src/cli/core/run.ts +2 -4
  128. package/src/cli/extensions/prisma.ts +2 -4
  129. package/src/libs/init-generator.ts +2 -4
  130. package/src/pkg-root.ts +14 -0
  131. package/src/plugins.ts +2 -4
  132. package/dist/app-support/crypto/aes.d.ts +0 -15
  133. package/dist/app-support/crypto/aes.d.ts.map +0 -1
  134. package/dist/app-support/crypto/aes.js +0 -56
  135. package/dist/app-support/crypto/aes.spec.d.ts +0 -2
  136. package/dist/app-support/crypto/aes.spec.d.ts.map +0 -1
  137. package/dist/app-support/crypto/aes.spec.js +0 -58
  138. package/dist/app-support/crypto/index.d.ts +0 -16
  139. package/dist/app-support/crypto/index.d.ts.map +0 -1
  140. package/dist/app-support/crypto/index.js +0 -31
  141. package/dist/app-support/crypto/internal-token.d.ts +0 -20
  142. package/dist/app-support/crypto/internal-token.d.ts.map +0 -1
  143. package/dist/app-support/crypto/internal-token.js +0 -42
  144. package/dist/app-support/crypto/internal-token.spec.d.ts +0 -2
  145. package/dist/app-support/crypto/internal-token.spec.d.ts.map +0 -1
  146. package/dist/app-support/crypto/internal-token.spec.js +0 -45
  147. package/dist/app-support/crypto/secret.d.ts +0 -3
  148. package/dist/app-support/crypto/secret.d.ts.map +0 -1
  149. package/dist/app-support/crypto/secret.js +0 -12
  150. package/dist/app-support/crypto/secret.spec.d.ts +0 -2
  151. package/dist/app-support/crypto/secret.spec.d.ts.map +0 -1
  152. package/dist/app-support/crypto/secret.spec.js +0 -15
  153. package/dist/app-support/discovery/dev-discovery-loader.d.ts +0 -2
  154. package/dist/app-support/discovery/dev-discovery-loader.d.ts.map +0 -1
  155. package/dist/app-support/discovery/dev-discovery-loader.js +0 -30
  156. package/dist/app-support/discovery/service-endpoint.d.ts +0 -2
  157. package/dist/app-support/discovery/service-endpoint.d.ts.map +0 -1
  158. package/dist/app-support/discovery/service-endpoint.js +0 -10
  159. package/dist/cli/common.d.ts +0 -89
  160. package/dist/cli/common.d.ts.map +0 -1
  161. package/dist/cli/common.js +0 -246
  162. package/dist/cli/common.spec.d.ts +0 -2
  163. package/dist/cli/common.spec.d.ts.map +0 -1
  164. package/dist/cli/common.spec.js +0 -64
  165. package/dist/cli/core/affected.d.ts +0 -9
  166. package/dist/cli/core/affected.d.ts.map +0 -1
  167. package/dist/cli/core/affected.js +0 -101
  168. package/dist/cli/core/cloudrun.d.ts +0 -9
  169. package/dist/cli/core/cloudrun.d.ts.map +0 -1
  170. package/dist/cli/core/cloudrun.js +0 -119
  171. package/dist/cli/core/console.d.ts +0 -10
  172. package/dist/cli/core/console.d.ts.map +0 -1
  173. package/dist/cli/core/console.js +0 -50
  174. package/dist/cli/core/constant.d.ts +0 -9
  175. package/dist/cli/core/constant.d.ts.map +0 -1
  176. package/dist/cli/core/constant.js +0 -20
  177. package/dist/cli/core/env.d.ts +0 -9
  178. package/dist/cli/core/env.d.ts.map +0 -1
  179. package/dist/cli/core/env.js +0 -65
  180. package/dist/cli/core/exec.d.ts +0 -9
  181. package/dist/cli/core/exec.d.ts.map +0 -1
  182. package/dist/cli/core/exec.js +0 -48
  183. package/dist/cli/core/image.d.ts +0 -9
  184. package/dist/cli/core/image.d.ts.map +0 -1
  185. package/dist/cli/core/image.js +0 -153
  186. package/dist/cli/core/index.d.ts +0 -16
  187. package/dist/cli/core/index.d.ts.map +0 -1
  188. package/dist/cli/core/index.js +0 -15
  189. package/dist/cli/core/init.d.ts +0 -9
  190. package/dist/cli/core/init.d.ts.map +0 -1
  191. package/dist/cli/core/init.js +0 -219
  192. package/dist/cli/core/job.d.ts +0 -9
  193. package/dist/cli/core/job.d.ts.map +0 -1
  194. package/dist/cli/core/job.js +0 -65
  195. package/dist/cli/core/namespace.d.ts +0 -9
  196. package/dist/cli/core/namespace.d.ts.map +0 -1
  197. package/dist/cli/core/namespace.js +0 -67
  198. package/dist/cli/core/prep-build.d.ts +0 -10
  199. package/dist/cli/core/prep-build.d.ts.map +0 -1
  200. package/dist/cli/core/prep-build.js +0 -109
  201. package/dist/cli/core/registry.d.ts +0 -9
  202. package/dist/cli/core/registry.d.ts.map +0 -1
  203. package/dist/cli/core/registry.js +0 -66
  204. package/dist/cli/core/run-many.d.ts +0 -10
  205. package/dist/cli/core/run-many.d.ts.map +0 -1
  206. package/dist/cli/core/run-many.js +0 -48
  207. package/dist/cli/core/run.d.ts +0 -9
  208. package/dist/cli/core/run.d.ts.map +0 -1
  209. package/dist/cli/core/run.js +0 -35
  210. package/dist/cli/core/test.d.ts +0 -9
  211. package/dist/cli/core/test.d.ts.map +0 -1
  212. package/dist/cli/core/test.js +0 -26
  213. package/dist/cli/extensions/dml.d.ts +0 -9
  214. package/dist/cli/extensions/dml.d.ts.map +0 -1
  215. package/dist/cli/extensions/dml.js +0 -114
  216. package/dist/cli/extensions/index.d.ts +0 -9
  217. package/dist/cli/extensions/index.d.ts.map +0 -1
  218. package/dist/cli/extensions/index.js +0 -8
  219. package/dist/cli/extensions/internal-curl.d.ts +0 -10
  220. package/dist/cli/extensions/internal-curl.d.ts.map +0 -1
  221. package/dist/cli/extensions/internal-curl.js +0 -41
  222. package/dist/cli/extensions/jwt.d.ts +0 -9
  223. package/dist/cli/extensions/jwt.d.ts.map +0 -1
  224. package/dist/cli/extensions/jwt.js +0 -25
  225. package/dist/cli/extensions/prisma.d.ts +0 -9
  226. package/dist/cli/extensions/prisma.d.ts.map +0 -1
  227. package/dist/cli/extensions/prisma.js +0 -23
  228. package/dist/cli/extensions/redis-bitnami.d.ts +0 -11
  229. package/dist/cli/extensions/redis-bitnami.d.ts.map +0 -1
  230. package/dist/cli/extensions/redis-bitnami.js +0 -74
  231. package/dist/cli/extensions/redis-ha.d.ts +0 -11
  232. package/dist/cli/extensions/redis-ha.d.ts.map +0 -1
  233. package/dist/cli/extensions/redis-ha.js +0 -51
  234. package/dist/cli/extensions/stackgres.d.ts +0 -10
  235. package/dist/cli/extensions/stackgres.d.ts.map +0 -1
  236. package/dist/cli/extensions/stackgres.js +0 -117
  237. package/dist/cli/extensions/template.d.ts +0 -9
  238. package/dist/cli/extensions/template.d.ts.map +0 -1
  239. package/dist/cli/extensions/template.js +0 -121
  240. package/dist/devops.d.ts.map +0 -1
  241. package/dist/index.d.ts.map +0 -1
  242. package/dist/libs/affected-entities.d.ts +0 -15
  243. package/dist/libs/affected-entities.d.ts.map +0 -1
  244. package/dist/libs/affected-entities.js +0 -52
  245. package/dist/libs/cloudrun-helpers.d.ts +0 -16
  246. package/dist/libs/cloudrun-helpers.d.ts.map +0 -1
  247. package/dist/libs/cloudrun-helpers.js +0 -81
  248. package/dist/libs/config.d.ts +0 -7
  249. package/dist/libs/config.d.ts.map +0 -1
  250. package/dist/libs/config.js +0 -102
  251. package/dist/libs/digital-ocean/container-reg.d.ts +0 -6
  252. package/dist/libs/digital-ocean/container-reg.d.ts.map +0 -1
  253. package/dist/libs/digital-ocean/container-reg.js +0 -74
  254. package/dist/libs/discovery/dependencies.d.ts +0 -19
  255. package/dist/libs/discovery/dependencies.d.ts.map +0 -1
  256. package/dist/libs/discovery/dependencies.js +0 -62
  257. package/dist/libs/discovery/dependencies.spec.d.ts +0 -2
  258. package/dist/libs/discovery/dependencies.spec.d.ts.map +0 -1
  259. package/dist/libs/discovery/dependencies.spec.js +0 -21
  260. package/dist/libs/discovery/images.d.ts +0 -5
  261. package/dist/libs/discovery/images.d.ts.map +0 -1
  262. package/dist/libs/discovery/images.js +0 -45
  263. package/dist/libs/discovery/index.d.ts +0 -6
  264. package/dist/libs/discovery/index.d.ts.map +0 -1
  265. package/dist/libs/discovery/index.js +0 -67
  266. package/dist/libs/discovery/process-common.d.ts +0 -25
  267. package/dist/libs/discovery/process-common.d.ts.map +0 -1
  268. package/dist/libs/discovery/process-common.js +0 -40
  269. package/dist/libs/discovery/process-package-json.d.ts +0 -3
  270. package/dist/libs/discovery/process-package-json.d.ts.map +0 -1
  271. package/dist/libs/discovery/process-package-json.js +0 -40
  272. package/dist/libs/discovery/process-pyproject-toml.d.ts +0 -3
  273. package/dist/libs/discovery/process-pyproject-toml.d.ts.map +0 -1
  274. package/dist/libs/discovery/process-pyproject-toml.js +0 -49
  275. package/dist/libs/git-helpers.d.ts +0 -8
  276. package/dist/libs/git-helpers.d.ts.map +0 -1
  277. package/dist/libs/git-helpers.js +0 -20
  278. package/dist/libs/hetzner/reg-secret.d.ts +0 -3
  279. package/dist/libs/hetzner/reg-secret.d.ts.map +0 -1
  280. package/dist/libs/hetzner/reg-secret.js +0 -39
  281. package/dist/libs/init-generator.d.ts +0 -41
  282. package/dist/libs/init-generator.d.ts.map +0 -1
  283. package/dist/libs/init-generator.js +0 -123
  284. package/dist/libs/k8s-constants.d.ts +0 -13
  285. package/dist/libs/k8s-constants.d.ts.map +0 -1
  286. package/dist/libs/k8s-constants.js +0 -91
  287. package/dist/libs/k8s-db.d.ts +0 -18
  288. package/dist/libs/k8s-db.d.ts.map +0 -1
  289. package/dist/libs/k8s-db.js +0 -73
  290. package/dist/libs/k8s-generate.d.ts +0 -17
  291. package/dist/libs/k8s-generate.d.ts.map +0 -1
  292. package/dist/libs/k8s-generate.js +0 -193
  293. package/dist/libs/k8s-helpers.d.ts +0 -11
  294. package/dist/libs/k8s-helpers.d.ts.map +0 -1
  295. package/dist/libs/k8s-helpers.js +0 -42
  296. package/dist/libs/k8s-image-config.d.ts +0 -8
  297. package/dist/libs/k8s-image-config.d.ts.map +0 -1
  298. package/dist/libs/k8s-image-config.js +0 -113
  299. package/dist/libs/k8s-job-waiter.d.ts +0 -8
  300. package/dist/libs/k8s-job-waiter.d.ts.map +0 -1
  301. package/dist/libs/k8s-job-waiter.js +0 -84
  302. package/dist/libs/k8s-namespace.d.ts +0 -7
  303. package/dist/libs/k8s-namespace.d.ts.map +0 -1
  304. package/dist/libs/k8s-namespace.js +0 -27
  305. package/dist/libs/k8s-redis-bitnami.d.ts +0 -6
  306. package/dist/libs/k8s-redis-bitnami.d.ts.map +0 -1
  307. package/dist/libs/k8s-redis-bitnami.js +0 -31
  308. package/dist/libs/k8s-redis-ha.d.ts +0 -3
  309. package/dist/libs/k8s-redis-ha.d.ts.map +0 -1
  310. package/dist/libs/k8s-redis-ha.js +0 -15
  311. package/dist/libs/k8s-secrets-manager.d.ts +0 -6
  312. package/dist/libs/k8s-secrets-manager.d.ts.map +0 -1
  313. package/dist/libs/k8s-secrets-manager.js +0 -64
  314. package/dist/libs/validate-env.d.ts +0 -56
  315. package/dist/libs/validate-env.d.ts.map +0 -1
  316. package/dist/libs/validate-env.js +0 -214
  317. package/dist/libs/validate-env.spec.d.ts +0 -2
  318. package/dist/libs/validate-env.spec.d.ts.map +0 -1
  319. package/dist/libs/validate-env.spec.js +0 -168
  320. package/dist/plugins.d.ts.map +0 -1
  321. package/dist/types/index.d.ts +0 -939
  322. package/dist/types/index.d.ts.map +0 -1
  323. package/dist/types/index.js +0 -82
@@ -0,0 +1,76 @@
1
+ expose:
2
+ type: ingress
3
+ ingress:
4
+ hosts:
5
+ core: $REGISTRY_BASE_URL
6
+ tls:
7
+ certSource: secret
8
+ secret:
9
+ secretName: tls-secret
10
+ externalURL: https://$REGISTRY_BASE_URL
11
+ persistence:
12
+ enabled: true
13
+ persistentVolumeClaim:
14
+ registry:
15
+ storageClass: "hcloud-volumes"
16
+ accessMode: ReadWriteOnce
17
+ size: 20Gi
18
+ jobservice:
19
+ storageClass: "hcloud-volumes"
20
+ accessMode: ReadWriteOnce
21
+ size: 5Gi
22
+ chartmuseum:
23
+ storageClass: "hcloud-volumes"
24
+ accessMode: ReadWriteOnce
25
+ size: 5Gi
26
+ database:
27
+ internal:
28
+ livenessProbe:
29
+ timeoutSeconds: 5
30
+ readinessProbe:
31
+ timeoutSeconds: 5
32
+ core:
33
+ livenessProbe:
34
+ initialDelaySeconds: 10
35
+ periodSeconds: 10
36
+ timeoutSeconds: 5
37
+ failureThreshold: 3
38
+ readinessProbe:
39
+ initialDelaySeconds: 5
40
+ periodSeconds: 10
41
+ timeoutSeconds: 5
42
+ failureThreshold: 3
43
+ jobservice:
44
+ livenessProbe:
45
+ initialDelaySeconds: 10
46
+ periodSeconds: 10
47
+ timeoutSeconds: 5
48
+ failureThreshold: 3
49
+ readinessProbe:
50
+ initialDelaySeconds: 5
51
+ periodSeconds: 10
52
+ timeoutSeconds: 5
53
+ failureThreshold: 3
54
+ registry:
55
+ registry:
56
+ livenessProbe:
57
+ initialDelaySeconds: 10
58
+ periodSeconds: 10
59
+ timeoutSeconds: 5
60
+ failureThreshold: 3
61
+ readinessProbe:
62
+ initialDelaySeconds: 5
63
+ periodSeconds: 10
64
+ timeoutSeconds: 5
65
+ failureThreshold: 3
66
+ controller:
67
+ livenessProbe:
68
+ initialDelaySeconds: 10
69
+ periodSeconds: 10
70
+ timeoutSeconds: 5
71
+ failureThreshold: 3
72
+ readinessProbe:
73
+ initialDelaySeconds: 5
74
+ periodSeconds: 10
75
+ timeoutSeconds: 5
76
+ failureThreshold: 3
@@ -0,0 +1,113 @@
1
+ ---
2
+ cluster_name: $PROJECT_NAME
3
+ kubeconfig_path: "./config/kubeconfig"
4
+ k3s_version: v1.32.2+k3s1
5
+
6
+ networking:
7
+ ssh:
8
+ port: 22
9
+ use_agent: false # set to true if your key has a passphrase
10
+ public_key_path: "~/.ssh/id_hcloud.pub"
11
+ private_key_path: "~/.ssh/id_hcloud"
12
+ allowed_networks:
13
+ ssh:
14
+ - 0.0.0.0/0
15
+ api: # this will firewall port 6443 on the nodes
16
+ - 0.0.0.0/0
17
+ public_network:
18
+ ipv4: true
19
+ ipv6: true
20
+ private_network:
21
+ enabled: true
22
+ subnet: 10.0.0.0/16
23
+ existing_network_name: ""
24
+ cni:
25
+ enabled: true
26
+ encryption: false
27
+ mode: flannel
28
+
29
+ # cluster_cidr: 10.244.0.0/16 # optional: a custom IPv4/IPv6 network CIDR to use for pod IPs
30
+ # service_cidr: 10.43.0.0/16 # optional: a custom IPv4/IPv6 network CIDR to use for service IPs. Warning, if you change this, you should also change cluster_dns!
31
+ # cluster_dns: 10.43.0.10 # optional: IPv4 Cluster IP for coredns service. Needs to be an address from the service_cidr range
32
+
33
+
34
+ # manifests:
35
+ # cloud_controller_manager_manifest_url: "https://github.com/hetznercloud/hcloud-cloud-controller-manager/releases/download/v1.23.0/ccm-networks.yaml"
36
+ # csi_driver_manifest_url: "https://raw.githubusercontent.com/hetznercloud/csi-driver/v2.12.0/deploy/kubernetes/hcloud-csi.yml"
37
+ # system_upgrade_controller_deployment_manifest_url: "https://github.com/rancher/system-upgrade-controller/releases/download/v0.14.2/system-upgrade-controller.yaml"
38
+ # system_upgrade_controller_crd_manifest_url: "https://github.com/rancher/system-upgrade-controller/releases/download/v0.14.2/crd.yaml"
39
+ # cluster_autoscaler_manifest_url: "https://raw.githubusercontent.com/kubernetes/autoscaler/master/cluster-autoscaler/cloudprovider/hetzner/examples/cluster-autoscaler-run-on-master.yaml"
40
+ # cluster_autoscaler_container_image_tag: "v1.32.0"
41
+
42
+ # datastore:
43
+ # mode: etcd # etcd (default) or external
44
+ # external_datastore_endpoint: postgres://....
45
+
46
+ schedule_workloads_on_masters: false
47
+
48
+ # image: rocky-9 # optional: default is ubuntu-24.04
49
+ # autoscaling_image: 103908130 # optional, defaults to the `image` setting
50
+ # snapshot_os: microos # optional: specified the os type when using a custom snapshot
51
+
52
+ masters_pool:
53
+ instance_type: cpx21
54
+ instance_count: 1 # for HA; you can also create a single master cluster for dev and testing (not recommended for production)
55
+ locations: # You can choose a single location for single master clusters or if you prefer to have all masters in the same location. For regional clusters (which are only available in the eu-central network zone), each master needs to be placed in a separate location.
56
+ # - fsn1
57
+ # - hel1
58
+ - nbg1
59
+
60
+ worker_node_pools:
61
+ - name: small-static
62
+ instance_type: cx32
63
+ instance_count: 2
64
+ location: nbg1
65
+ # image: debian-11
66
+ # labels:
67
+ # - key: purpose
68
+ # value: blah
69
+ # taints:
70
+ # - key: something
71
+ # value: value1:NoSchedule
72
+ # - name: medium-autoscaled
73
+ # instance_type: cpx31
74
+ # location: fsn1
75
+ # autoscaling:
76
+ # enabled: true
77
+ # min_instances: 0
78
+ # max_instances: 3
79
+
80
+ embedded_registry_mirror:
81
+ enabled: false # Enables fast p2p distribution of container images between nodes for faster pod startup. Check if your k3s version is compatible before enabling this option. You can find more information at https://docs.k3s.io/installation/registry-mirror
82
+
83
+ protect_against_deletion: true
84
+
85
+ create_load_balancer_for_the_kubernetes_api: false # Just a heads up: right now, we can’t limit access to the load balancer by IP through the firewall. This feature hasn’t been added by Hetzner yet.
86
+
87
+ # additional_packages:
88
+ # - somepackage
89
+
90
+ # post_create_commands:
91
+ # - apt update
92
+ # - apt upgrade -y
93
+ # - apt autoremove -y
94
+
95
+ # kube_api_server_args:
96
+ # - arg1
97
+ # - ...
98
+ # kube_scheduler_args:
99
+ # - arg1
100
+ # - ...
101
+ # kube_controller_manager_args:
102
+ # - arg1
103
+ # - ...
104
+ # kube_cloud_controller_manager_args:
105
+ # - arg1
106
+ # - ...
107
+ # kubelet_args:
108
+ # - arg1
109
+ # - ...
110
+ # kube_proxy_args:
111
+ # - arg1
112
+ # - ...
113
+ # api_server_hostname: k8s.example.com # optional: DNS for the k8s API LoadBalancer. After the script has run, create a DNS record with the address of the API LoadBalancer.
@@ -0,0 +1,49 @@
1
+ # INSTALLATION
2
+ # 1. Install Helm: https://helm.sh/docs/intro/install/
3
+ # 2. Add ingress-nginx Helm repo: helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
4
+ # 3. Update information of available charts: helm repo update
5
+ # 4. Install ingress-nginx:
6
+ # helm upgrade --install \
7
+ # ingress-nginx ingress-nginx/ingress-nginx \
8
+ # --set controller.ingressClassResource.default=true \ # Remove this line if you don’t want Nginx to be the default Ingress Controller
9
+ # -f ./ingress-nginx-annotations.yaml \
10
+ # --namespace ingress-nginx \
11
+ # --create-namespace
12
+
13
+ # LIST of all ANNOTATIONS: https://github.com/hetznercloud/hcloud-cloud-controller-manager/blob/master/internal/annotation/load_balancer.go
14
+
15
+ controller:
16
+ kind: DaemonSet
17
+ service:
18
+ annotations:
19
+ # Germany:
20
+ # - nbg1 (Nuremberg)
21
+ # - fsn1 (Falkenstein)
22
+ # Finland:
23
+ # - hel1 (Helsinki)
24
+ # USA:
25
+ # - ash (Ashburn, Virginia)
26
+ # Without this, the load balancer won’t be provisioned and will stay in "pending" state.
27
+ # You can check this state using "kubectl get svc -n ingress-nginx"
28
+ load-balancer.hetzner.cloud/location: nbg1
29
+
30
+ # Name of the load balancer. This name will appear in your Hetzner cloud console under "Your project -> Load Balancers".
31
+ # NOTE: This is NOT the load balancer created automatically for HA clusters. You need to specify a different name here to create a separate load balancer for ingress Nginx.
32
+ load-balancer.hetzner.cloud/name: ingress-lb
33
+
34
+ # Ensures communication between the load balancer and cluster nodes happens through the private network.
35
+ load-balancer.hetzner.cloud/use-private-ip: "true"
36
+
37
+ # [ START: Use these annotations if you care about seeing the actual client IP ]
38
+ # "uses-proxyprotocol" enables the proxy protocol on the load balancer so that the ingress controller and applications can see the real client IP.
39
+ # "hostname" is needed if you use cert-manager (LetsEncrypt SSL certificates). It fixes HTTP01 challenges for cert-manager (https://cert-manager.io/docs/).
40
+ # Check this link for more details: https://github.com/compumike/hairpin-proxy
41
+ # In short: the easiest fix provided by some providers (including Hetzner) is to configure the load balancer to use a hostname instead of an IP.
42
+ load-balancer.hetzner.cloud/uses-proxyprotocol: 'true'
43
+
44
+ # 1. "yourDomain.com" must be correctly configured in DNS to point to the Nginx load balancer; otherwise, certificate provisioning won’t work.
45
+ # 2. If you use multiple domains, specify any one.
46
+ # load-balancer.hetzner.cloud/hostname: yourDomain.com
47
+ # [ END: Use these annotations if you care about seeing the actual client IP ]
48
+
49
+ load-balancer.hetzner.cloud/http-redirect-https: 'false'
@@ -0,0 +1,8 @@
1
+ apiVersion: v1
2
+ kind: ConfigMap
3
+ metadata:
4
+ # Do not change the name - this is required by the Nginx Ingress Controller
5
+ name: ingress-nginx-controller
6
+ namespace: ingress-nginx
7
+ data:
8
+ use-proxy-protocol: "true"
@@ -0,0 +1,8 @@
1
+ apiVersion: storage.k8s.io/v1
2
+ kind: StorageClass
3
+ metadata:
4
+ name: hcloud-volumes-retain
5
+ provisioner: csi.hetzner.cloud
6
+ reclaimPolicy: Retain
7
+ volumeBindingMode: WaitForFirstConsumer
8
+ allowVolumeExpansion: true
@@ -0,0 +1,93 @@
1
+ name: "Monorepo Build and Deploy"
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - staging
7
+ - production
8
+
9
+ permissions:
10
+ contents: read
11
+ packages: read
12
+ # For deploying images to Cloud Run
13
+ # id-token: write
14
+
15
+ jobs:
16
+ build_images:
17
+ runs-on: ubuntu-latest
18
+ strategy:
19
+ matrix:
20
+ include:
21
+ - image_name: main-node
22
+ - image_name: main-python
23
+ cache_path: /root/.cache/uv
24
+ steps:
25
+ # Fetch the last 50 commits so that devops affected works
26
+ - name: Checkout repo and history
27
+ uses: actions/checkout@v4
28
+ with:
29
+ fetch-depth: 50
30
+
31
+ - name: Setup prerequesites
32
+ uses: ./.github/actions/setup-prereq@v1
33
+
34
+ - name: Connect to Hetzner
35
+ uses: ./.github/actions/connect-to-hetzner@v1
36
+ with:
37
+ kubeconfig: ${{ secrets.HCLOUD_KUBECONFIG }}
38
+ harbor_user: ${{ secrets.HARBOR_USER }}
39
+ harbor_password: ${{ secrets.HARBOR_PASSWORD }}
40
+
41
+ # For deploying images to Cloud Run
42
+ # - name: Connect to Cloud Run
43
+ # uses: ./.github/actions/connect-to-cloud-run@v1
44
+ # with:
45
+ # project_id: ${{ vars.GCP_PROJECT_ID }}
46
+ # project_number: ${{ vars.GCP_PROJECT_NUMBER }}
47
+ # region: ${{ vars.GCP_ARTIFACT_REGISTRY_REGION }}
48
+
49
+ - name: Build image
50
+ uses: ./.github/actions/build-image@v1
51
+ with:
52
+ image_name: ${{ matrix.image_name }}
53
+ cache_path: ${{ matrix.cache_path || '/root/.bun/install/cache' }}
54
+
55
+ db_migrate_and_deploy:
56
+ needs: [build_images]
57
+ runs-on: ubuntu-latest
58
+ steps:
59
+ # Fetch the last 50 commits so that devops affected works
60
+ - name: Checkout repo and history
61
+ uses: actions/checkout@v4
62
+ with:
63
+ fetch-depth: 50
64
+
65
+ - name: Setup prerequesites
66
+ uses: ./.github/actions/setup-prereq@v1
67
+
68
+ - name: Connect to Hetzner
69
+ uses: ./.github/actions/connect-to-hetzner@v1
70
+ with:
71
+ kubeconfig: ${{ secrets.HCLOUD_KUBECONFIG }}
72
+ harbor_user: ${{ secrets.HARBOR_USER }}
73
+ harbor_password: ${{ secrets.HARBOR_PASSWORD }}
74
+
75
+ # For deploying images to Cloud Run
76
+ # - name: Connect to Cloud Run
77
+ # uses: ./.github/actions/connect-to-cloud-run@v1
78
+ # with:
79
+ # project_id: ${{ vars.GCP_PROJECT_ID }}
80
+ # project_number: ${{ vars.GCP_PROJECT_NUMBER }}
81
+ # region: ${{ vars.GCP_ARTIFACT_REGISTRY_REGION }}
82
+
83
+ - name: Run DB Migrate
84
+ uses: ./.github/actions/db-migrate@v1
85
+
86
+ # Repeat per image (it checks if the image is affected and deploys it if it is)
87
+ - name: Deploy main node
88
+ uses: ./.github/actions/deploy-image-k8s@v1
89
+ with: { "image_name": "main-node" }
90
+
91
+ - name: Deploy main python
92
+ uses: ./.github/actions/deploy-image-k8s@v1
93
+ with: { "image_name": "main-python" }
@@ -0,0 +1,4 @@
1
+ All files under `typescript` are copied under the root project folder.
2
+
3
+ During `./devops init`, the user is asked whether python-related files should be added to the repository.
4
+ If the user answers positively, the files under the `python` folder are also copied, overriding files with the same path.
@@ -0,0 +1,56 @@
1
+ ---
2
+ alwaysApply: true
3
+ ---
4
+
5
+ # Python Monorepo
6
+
7
+ This project includes a Python workspace alongside the TypeScript workspace.
8
+
9
+ - **`./devops`** is for TypeScript/Node packages (package.json tree)
10
+ - **`./devopspy`** is for Python packages (pyproject.toml tree)
11
+
12
+ The Python workspace is configured through a root `pyproject.toml` using uv workspaces.
13
+
14
+ ## Structure
15
+
16
+ Packages under `applications` depend on packages under `libs` using workspace dependencies. It makes sense to extract code to packages under `libs` when it is used in more than one application. Applications never rely on other applications.
17
+
18
+ All web services found under `applications` should respond to a `GET healthz` with status 200.
19
+
20
+ ## Using the devopspy CLI (Python only)
21
+
22
+ We use `uv` as our package manager. The `./devopspy` script is able to run scripts defined in pyproject.toml inside a workspace, run a shell process inside a workspace, and execute the tests in a project:
23
+
24
+ ```bash
25
+ # Most important commands
26
+ ./devopspy run <project-name>:<script-name>
27
+ ./devopspy exec --in <project-name> <command>
28
+ ./devopspy test
29
+ ./devopspy test <project-name>
30
+
31
+ # Examples
32
+ ./devopspy run my-api:dev
33
+ ./devopspy exec --in my-api uv add some-package
34
+ ./devopspy test my-service
35
+
36
+ # To sync dependencies on all workspaces in the monorepo, use uv normally
37
+ uv sync
38
+ ```
39
+
40
+ Scripts are defined in pyproject.toml under `[tool.devops.scripts]`:
41
+
42
+ ```toml
43
+ [tool.devops.scripts]
44
+ dev = "python -c 'from src.my_package.scripts import dev; dev()'"
45
+ start = "python -c 'from src.my_package.scripts import start; start()'"
46
+ ```
47
+
48
+ `./devopspy` automatically loads the right env variables, so don't use python-dotenv.
49
+
50
+ There is no need to `cd` into package directories. Prefer to use `./devopspy run` and `./devopspy exec`.
51
+
52
+ ## Testing
53
+
54
+ Use pytest.
55
+
56
+ **Always run tests with `./devopspy test`** to ensure the test environment is used.
@@ -0,0 +1,89 @@
1
+ # The file structure is as follows:
2
+ #
3
+ # Under `templates` key:
4
+ # <template-key>:
5
+ # copy-common: <boolean>
6
+ # extra-content:
7
+ # - <file-name>
8
+ # - <file-name>
9
+ #
10
+ # Where:
11
+ # <template-key> The identifier of the template.
12
+ # This is used to refer to the template in the images section.
13
+ # copy-common Whether to copy the common Docker files from .devops/docker-images/common to the image.
14
+ # extra-content Any files to include in the image that are not part of the build context. By default, all applications and their dependencies are copied, as well as the
15
+ # content of .devops/docker-images/<image-name>. If you need to include additional files, list them here. These are typically from the root of the project.
16
+ # Files and full folders are supported. Globs (wildcards) are currently not supported.
17
+ #
18
+ #
19
+ # Under `images` key:
20
+ # <image-key>:
21
+ # image-template: <image-template>
22
+ # language: <language>
23
+ # debug-template: <debug-template>
24
+ # can-db-migrate: <boolean>
25
+ # domains:
26
+ # production: <production-domain>
27
+ # staging: <staging-domain>
28
+ # image-extra-content:
29
+ # - <file-name>
30
+ # - <file-name>
31
+ # applications:
32
+ # - <application-name>
33
+ # - <application-name>
34
+ #
35
+ # Where:
36
+ # <image-name> The identifier of the image. Github action should refer to this name in a hard-coded manner when invoking devops scripts.
37
+ # This is also the basis for the name of the image in the registry.
38
+ # image-template The build process copies .devops/docker-images/<image-template>.Dockerfile and .devops/docker-images/<image-template>/ to the image.
39
+ # language The language of the image. Currently only "node" and "python" are supported.
40
+ # debug-template Each image comes with a debug pod that can be acccessed as a console. This is the name of the template to use.
41
+ # Only "debug-console" is currently supported. Can be left out if the image should not have a debug pod.
42
+ # can-db-migrate Whether this image can be used to run DB migrations. If set to true, the image could be used to run DB migrations if any project that uses this image depends
43
+ # on the db project and if the db project changed.
44
+ # domains The domains for the image. This is used to generate the ingress rules.
45
+ # This can be left out if the image does not have ingress rules, such as a worker image.
46
+ # cloudrun If this image should be pushed to cloudrun instead of the cluster registry, set to "true".
47
+ # applications List of applications that use this image. There is no need to specify dependencies - they will be derived as long as they are declared in package.json.
48
+ #
49
+
50
+ templates:
51
+ node-services:
52
+ copy-common: true
53
+ extra-content:
54
+ - devops
55
+ - package.json
56
+ - bun.lock
57
+ - tsconfig.json
58
+
59
+ python-services:
60
+ copy-common: true
61
+ extra-content:
62
+ - devopspy
63
+ - pyproject.toml
64
+ - uv.lock
65
+
66
+ images:
67
+ main-node:
68
+ image-template: node-services
69
+ language: node
70
+ debug-template: debug-console
71
+ can-db-migrate: true
72
+ domains:
73
+ production: $PRODUCTION_DOMAIN
74
+ staging: $STAGING_DOMAIN
75
+ applications:
76
+ - example-node
77
+ - jobs
78
+
79
+ main-python:
80
+ image-template: python-services
81
+ language: python
82
+ debug-template: debug-console
83
+ can-db-migrate: false
84
+ domains:
85
+ production: $PRODUCTION_DOMAIN
86
+ staging: $STAGING_DOMAIN
87
+ applications:
88
+ - example-python
89
+ - example-data-pipeline
@@ -0,0 +1,8 @@
1
+ #! /usr/bin/env bash
2
+
3
+ source "$(dirname "$0")/docker-common.sh"
4
+
5
+ check_env
6
+ setup_config
7
+ pause_if_no_args "$#"
8
+ "$@"
@@ -0,0 +1,8 @@
1
+ #! /usr/bin/env bash
2
+
3
+ source "$(dirname "$0")/docker-common.sh"
4
+
5
+ check_env
6
+ setup_config
7
+ pause_if_no_args "$#"
8
+ ./devopspy run $1:${2:-start}
@@ -0,0 +1,29 @@
1
+ FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim
2
+
3
+ ENV UV_SYSTEM_PYTHON=1
4
+ ENV PATH="/root/.local/bin:$PATH"
5
+
6
+ WORKDIR /app
7
+
8
+ ARG MONOREPO_ENV
9
+ ENV MONOREPO_ENV=${MONOREPO_ENV}
10
+ RUN echo "Building for environment: $MONOREPO_ENV"
11
+
12
+ # Install dependencies
13
+ RUN apt-get update && apt-get install -y jq libpq-dev curl git parallel --fix-missing
14
+
15
+ # Copy project files
16
+ COPY . .
17
+
18
+ RUN \
19
+ --mount=type=cache,target=/root/.cache/uv \
20
+ uv sync --all-packages --all-extras
21
+
22
+ # For prisma client, if used
23
+ RUN ./devopspy run-many generate
24
+ RUN ./devopspy run-many build
25
+
26
+ # The config folder will be mounted when the pod starts with up-to-date env variables that are used in runtime by server-side code
27
+ RUN rm -rf config/
28
+
29
+ ENTRYPOINT [ "./python-run.sh" ]
@@ -0,0 +1,21 @@
1
+ # db-migrate is a required entry that is hard-coded in the devops-cli
2
+ # The debug template used per image is dynamic and can be configured in images.yaml
3
+ # The deployment template used per application is dynamic and can be configured in its package.json
4
+
5
+ db-migrate:
6
+ - db-migrate-job.yaml.hb
7
+ debug-console:
8
+ - deployment-debug.yaml.hb
9
+ cron-jobs:
10
+ - cron-jobs.yaml.hb
11
+ backend-process:
12
+ - deployment-process.yaml.hb
13
+ internal-service:
14
+ - deployment-web.yaml.hb
15
+ - service.yaml.hb
16
+ external-service:
17
+ - deployment-web.yaml.hb
18
+ - service.yaml.hb
19
+ - ingress.yaml.hb
20
+ prefect:
21
+ - prefect.yaml.hb
@@ -0,0 +1,63 @@
1
+ {{#each prefectFlows}}
2
+ apiVersion: apps/v1
3
+ kind: Deployment
4
+ metadata:
5
+ labels:
6
+ app: {{../app_name}}
7
+ env: {{../monorepo_env}}
8
+ name: {{../app_name}}-{{flow_name}}
9
+ namespace: {{../namespace}}
10
+ spec:
11
+ replicas: 1
12
+ selector:
13
+ matchLabels:
14
+ app: {{../app_name}}
15
+ template:
16
+ metadata:
17
+ labels:
18
+ app: {{../app_name}}
19
+ env: {{../monorepo_env}}
20
+ spec:
21
+ volumes:
22
+ - name: secret-injection-hook
23
+ secret:
24
+ secretName: {{../env_secret_name}}
25
+ containers:
26
+ - image: {{../image_path}}
27
+ name: {{flow_name}}
28
+ command:
29
+ - ./python-exec.sh
30
+ args:
31
+ - ./devopspy
32
+ - exec
33
+ - --in
34
+ - {{../app_name}}
35
+ - python
36
+ - -m
37
+ - {{script_path}}
38
+ env:
39
+ - name: PREFECT_API_URL
40
+ value: http://prefect-server.prefect-{{../monorepo_env}}:4200/api
41
+ - name: MONOREPO_ENV
42
+ value: {{../monorepo_env}}
43
+ - name: MONOREPO_NAMESPACE
44
+ value: {{../namespace}}
45
+ - name: IS_KUBERNETES
46
+ value: 'true'
47
+ - name: MONOREPO_BASE_SECRET
48
+ valueFrom:
49
+ secretKeyRef:
50
+ name: {{../env_secret_name}}
51
+ key: {{../env_base_secret_key}}
52
+ volumeMounts:
53
+ - name: secret-injection-hook
54
+ mountPath: /etc/kubernetes/secrets
55
+ readOnly: true
56
+ resources:
57
+ requests:
58
+ memory: 250Mi
59
+ cpu: 250m
60
+ {{#unless @last}}
61
+ ---
62
+ {{/unless}}
63
+ {{/each}}
@@ -0,0 +1,14 @@
1
+ [project]
2
+ name = "example-data-pipeline"
3
+ version = "0.1.0"
4
+ description = ""
5
+ authors = []
6
+ requires-python = ">=3.12"
7
+ dependencies = ["prefect (>=3.2.14,<4.0.0)"]
8
+
9
+ [tool.devops.deployment]
10
+ template = "prefect"
11
+
12
+ [[tool.devops.deployment.prefectFlows]]
13
+ flow_name = "test-flow"
14
+ script_path = "src.example_data_pipeline.main"