@flisk-sh/flisk 1.3.207 → 1.4.1
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.
- package/LICENSE +1 -1
- package/README.md +40 -37
- package/cli/dist/agent-runtimes/custom.js +3 -3
- package/cli/dist/agent-runtimes/registry.js +3 -3
- package/cli/dist/backend-frameworks/registry.js +8 -8
- package/cli/dist/backend-languages/python.js +4 -1
- package/cli/dist/backend-languages/registry.js +3 -3
- package/cli/dist/cli.js +4 -3
- package/cli/dist/commands/agent.js +8 -8
- package/cli/dist/commands/completion.js +26 -26
- package/cli/dist/commands/config.js +8 -8
- package/cli/dist/commands/doctor.js +80 -18
- package/cli/dist/commands/down.js +1 -1
- package/cli/dist/commands/eject.js +10 -10
- package/cli/dist/commands/help.js +2 -2
- package/cli/dist/commands/import.js +2 -2
- package/cli/dist/commands/logs.js +2 -2
- package/cli/dist/commands/mcp.js +2 -2
- package/cli/dist/commands/networks.js +2 -2
- package/cli/dist/commands/open.js +0 -1
- package/cli/dist/commands/project.js +19 -19
- package/cli/dist/commands/projects.js +1 -1
- package/cli/dist/commands/resource.js +21 -21
- package/cli/dist/commands/resources.js +2 -2
- package/cli/dist/commands/restart.js +7 -4
- package/cli/dist/commands/runtime.js +19 -4
- package/cli/dist/commands/stack.js +8 -8
- package/cli/dist/commands/up.js +23 -23
- package/cli/dist/commands/upgrade.js +44 -40
- package/cli/dist/frontend-frameworks/registry.js +3 -3
- package/cli/dist/generator/extension-fetch.js +12 -9
- package/cli/dist/generator/template-engine.js +72 -56
- package/cli/dist/mcp/tools.js +2 -2
- package/cli/dist/utils/agent-host.js +1 -1
- package/cli/dist/utils/cli-command.js +1 -1
- package/cli/dist/utils/cold-preflight.js +2 -2
- package/cli/dist/utils/constants.js +3 -3
- package/cli/dist/utils/discovery-paths.js +2 -2
- package/cli/dist/utils/doctor-fix.js +10 -10
- package/cli/dist/utils/doctor-report.js +3 -3
- package/cli/dist/utils/doctor-runtime.js +4 -3
- package/cli/dist/utils/doctor-starlark.js +3 -3
- package/cli/dist/utils/doctor-wiring.js +4 -4
- package/cli/dist/utils/down-cleanup.js +2 -2
- package/cli/dist/utils/env-compat-init.js +8 -0
- package/cli/dist/utils/env-compat.js +27 -0
- package/cli/dist/utils/env-selection.js +9 -9
- package/cli/dist/utils/errors.js +13 -13
- package/cli/dist/utils/file-helpers.js +5 -5
- package/cli/dist/utils/{tdk-version.js → flisk-version.js} +8 -8
- package/cli/dist/utils/generated-paths.js +6 -6
- package/cli/dist/utils/host-port-config.js +10 -10
- package/cli/dist/utils/host-port-plan.js +3 -3
- package/cli/dist/utils/machine-output.js +2 -2
- package/cli/dist/utils/native-windows.js +1 -1
- package/cli/dist/utils/paths.js +3 -3
- package/cli/dist/utils/platform.js +9 -9
- package/cli/dist/utils/port-conflict-fix.js +3 -3
- package/cli/dist/utils/port-fallback-notice.js +3 -3
- package/cli/dist/utils/project-config-defaults.js +1 -1
- package/cli/dist/utils/project-features.js +2 -2
- package/cli/dist/utils/resource-features.js +3 -3
- package/cli/dist/utils/runtime-layout.js +65 -0
- package/cli/dist/utils/schema-version-gate.js +3 -2
- package/cli/dist/utils/service-urls.js +3 -3
- package/cli/dist/utils/services.js +2 -2
- package/cli/dist/utils/shared-infra.js +2 -2
- package/cli/dist/utils/shared-platform-postgres.js +6 -6
- package/cli/dist/utils/tar.js +1 -1
- package/cli/dist/utils/tilt.js +1 -1
- package/cli/dist/utils/up-readiness.js +1 -1
- package/cli/dist/utils/windows-doctor.js +3 -3
- package/cli/dist-bundle/{chunk-YZRPX76N.js → chunk-3J6XI3NX.js} +1 -1
- package/cli/dist-bundle/chunk-7HR5PVOD.js +54 -0
- package/cli/dist-bundle/{chunk-FAHNFTWN.js → chunk-7IXBBU27.js} +2 -2
- package/cli/dist-bundle/chunk-BB5BZ37Y.js +10 -0
- package/cli/dist-bundle/{chunk-SLKTM6ZO.js → chunk-DUNCELUK.js} +14 -14
- package/cli/dist-bundle/chunk-K6SOCO6V.js +3 -0
- package/cli/dist-bundle/{chunk-D2DIEX5E.js → chunk-KJOCVAMQ.js} +2 -2
- package/cli/dist-bundle/{chunk-6EA4DGCY.js → chunk-KJZUBHLO.js} +1 -1
- package/cli/dist-bundle/chunk-L6U555CJ.js +61 -0
- package/cli/dist-bundle/chunk-M2R464RM.js +7 -0
- package/cli/dist-bundle/{chunk-GOEBYLFN.js → chunk-MINZ25AC.js} +1 -1
- package/cli/dist-bundle/chunk-RX6O3PG4.js +2 -0
- package/cli/dist-bundle/chunk-SRN64OPO.js +35 -0
- package/cli/dist-bundle/chunk-TZNXL3IO.js +2 -0
- package/cli/dist-bundle/{chunk-5LRMAY67.js → chunk-UJXR6MZ2.js} +13 -13
- package/cli/dist-bundle/{chunk-AGXA5DOQ.js → chunk-VRESY4NR.js} +3 -3
- package/cli/dist-bundle/{chunk-53M5D4KE.js → chunk-XD3BBFZB.js} +1 -1
- package/cli/dist-bundle/{chunk-GIMHTZNR.js → chunk-YL56J2WX.js} +1 -1
- package/cli/dist-bundle/cli.js +254 -254
- package/cli/dist-bundle/cold-preflight-BBDDHWRV.js +2 -0
- package/cli/dist-bundle/colima-GBURKN54.js +2 -0
- package/cli/dist-bundle/{demo-stage-ANHJKDZC.js → demo-stage-HIHO4VV3.js} +2 -2
- package/cli/dist-bundle/{devtools-MGITLOWZ.js → devtools-ZD6XIOLD.js} +2 -2
- package/cli/dist-bundle/extension-fetch-VEFSCG4B.js +2 -0
- package/cli/dist-bundle/native-windows-BWVEYVPO.js +2 -0
- package/cli/dist-bundle/{one-command-P6XVAXWV.js → one-command-VNKQAMFJ.js} +2 -2
- package/cli/dist-bundle/open-W3QX35R6.js +2 -0
- package/cli/dist-bundle/project-FW5LL2KM.js +2 -0
- package/cli/dist-bundle/project-templates-EYSQG2EO.js +2 -0
- package/cli/dist-bundle/{services-CBXN4SXC.js → services-RGTQ2LXC.js} +2 -2
- package/cli/dist-bundle/{stack-progress-6GO2TCRH.js → stack-progress-NIFM5T2K.js} +2 -2
- package/cli/dist-bundle/tilt-port-owner-6DO7OJRR.js +2 -0
- package/cli/dist-bundle/url-actions-HXJLBTX6.js +2 -0
- package/cli/package.json +5 -5
- package/cli/shared-platform-engineering/docker-templates/infisical-entrypoint.sh +2 -2
- package/cli/shared-platform-engineering/docker-templates/install-deps.sh +2 -2
- package/cli/templates/.tiltignore.hbs +2 -2
- package/cli/templates/TILT_RESOURCE_DEFAULTS.star.hbs +1 -1
- package/cli/templates/TILT_TECH_STACK.star.hbs +1 -1
- package/cli/templates/Tiltfile.hbs +21 -21
- package/cli/templates/spec.master.hbs +4 -4
- package/examples/tdk-example/LICENSE +1 -1
- package/examples/tdk-example/Tiltfile +10 -10
- package/examples/tdk-example/services/platform/messaging/docker-compose.yml +7 -7
- package/examples/tdk-example/services/shop/orders-api/service.json +1 -1
- package/examples/tdk-example/services/shop/orders-api/src/index.ts +1 -1
- package/examples/tdk-example/services/shop/orders-app/index.html +1 -1
- package/examples/tdk-example/services/shop/orders-worker/service.json +1 -1
- package/examples/tdk-example/services/shop/orders-worker/src/index.ts +1 -1
- package/package.json +39 -12
- package/{Tiltfile → runtime/Tiltfile} +9 -5
- package/{discovery → runtime/discovery}/AGENTS.md +1 -1
- package/{discovery → runtime/discovery}/TILT_DISCOVERY.star +5 -5
- package/{discovery → runtime/discovery}/Tiltfile +5 -5
- package/{discovery → runtime/discovery}/config.star +5 -5
- package/{discovery → runtime/discovery}/constants.star +14 -14
- package/{discovery → runtime/discovery}/deterministic.star +1 -1
- package/{discovery → runtime/discovery}/discovery_daemon.star +2 -2
- package/{discovery → runtime/discovery}/discovery_orchestrator.star +17 -17
- package/{discovery → runtime/discovery}/identity-management-backend/service.yaml +2 -2
- package/{discovery → runtime/discovery}/incremental_discovery.star +1 -1
- package/{discovery → runtime/discovery}/json_manifest_scanner.star +2 -2
- package/{discovery → runtime/discovery}/libraries.star +1 -1
- package/{discovery → runtime/discovery}/manifest/constants.star +1 -1
- package/{discovery → runtime/discovery}/manifest/loading.star +7 -7
- package/{discovery → runtime/discovery}/manifest/normalize.star +12 -15
- package/{discovery → runtime/discovery}/registry.star +11 -11
- package/{discovery → runtime/discovery}/resource_snapshot.py +2 -2
- package/{discovery → runtime/discovery}/resource_snapshot.star +6 -6
- package/{discovery → runtime/discovery}/services/platform/orchestrator/orchestrator-glue-backend/service.yaml +2 -2
- package/{engine → runtime/engine}/AGENTS.md +6 -6
- package/{engine → runtime/engine}/README.md +2 -2
- package/{engine → runtime/engine}/Tiltfile +5 -5
- package/{engine → runtime/engine}/assets/docker/golden-layers.Dockerfile +17 -17
- package/{engine → runtime/engine}/assets/docker/wake-gateway/Dockerfile +7 -0
- package/{engine → runtime/engine}/entrypoint.star +1 -1
- package/{engine → runtime/engine}/paths.star +5 -5
- package/{engine → runtime/engine}/schemas/project-schema.json +2 -2
- package/{engine → runtime/engine}/schemas/service-schema.json +5 -5
- package/{engine → runtime/engine}/scripts/debug-container.sh +3 -3
- package/{engine → runtime/engine}/spec.master +3 -3
- package/{engine → runtime/engine}/topologies/README.md +3 -3
- package/{engine → runtime/engine}/topologies/platform/docker/build/golden_image_build.star +5 -5
- package/{engine → runtime/engine}/topologies/platform/docker/build/golden_image_constants.star +7 -7
- package/{engine → runtime/engine}/topologies/platform/docker/build/golden_image_dockerfile.star +8 -8
- package/{engine → runtime/engine}/topologies/platform/docker/compose/compose.star +12 -12
- package/{engine → runtime/engine}/topologies/platform/docker/compose/traefik_standalone.star +21 -6
- package/{engine → runtime/engine}/topologies/platform/docker/config/healthcheck.star +7 -7
- package/{engine → runtime/engine}/topologies/platform/docker/constants.star +7 -7
- package/{engine → runtime/engine}/topologies/platform/docker/dockerfile/language_dockerfile.star +3 -3
- package/{engine → runtime/engine}/topologies/platform/docker/layers/l1_base_layers.star +5 -5
- package/{engine → runtime/engine}/topologies/platform/docker/layers/l2_dependency_layers.star +14 -14
- package/{engine → runtime/engine}/topologies/platform/docker/layers/l3_builder_layers.star +5 -5
- package/{engine → runtime/engine}/topologies/platform/docker/layers/l4_runtime_layers.star +8 -8
- package/{engine → runtime/engine}/topologies/platform/docker/layers/prisma/constants.star +5 -5
- package/{engine → runtime/engine}/topologies/platform/docker/networking/api_path_constants.star +5 -5
- package/{engine → runtime/engine}/topologies/platform/docker/networking/sablier_container_cycle.star +1 -1
- package/{engine → runtime/engine}/topologies/platform/docker/networking/traefik_static_routes.star +1 -1
- package/{engine → runtime/engine}/topologies/platform/docker/secrets/env_secrets.star +2 -2
- package/{engine → runtime/engine}/topologies/platform/docker/secrets/infisical.star +4 -4
- package/{engine → runtime/engine}/topologies/platform/registries/verdaccio_loader.star +1 -1
- package/{engine → runtime/engine}/topologies/platform/security/secrets.star +1 -1
- package/{engine → runtime/engine}/topologies/tilt/common/utils.star +9 -10
- package/{engine → runtime/engine}/topologies/tilt/common/utils_debug.star +1 -1
- package/{engine → runtime/engine}/topologies/tilt/common/utils_deterministic.star +2 -2
- package/{engine → runtime/engine}/topologies/tilt/common/utils_env.star +5 -5
- package/{engine → runtime/engine}/topologies/tilt/config/profiles.star +4 -4
- package/{engine → runtime/engine}/topologies/tilt/generators/agents_md.star +1 -1
- package/{engine → runtime/engine}/topologies/tilt/generators/infisical/README.md +1 -1
- package/{engine → runtime/engine}/topologies/tilt/generators/infisical/organization.star +6 -6
- package/{engine → runtime/engine}/topologies/tilt/generators/npmrc.star +5 -5
- package/{engine → runtime/engine}/topologies/tilt/generators/typescript/backend_tsconfig.star +1 -1
- package/{engine → runtime/engine}/topologies/tilt/generators/typescript/playwright_config.star +1 -1
- package/{engine → runtime/engine}/topologies/tilt/generators/vite/helpers.star +7 -7
- package/{engine → runtime/engine}/topologies/tilt/generators/vite/templates.star +5 -5
- package/{engine → runtime/engine}/topologies/tilt/manifest/json_to_yaml.py +2 -2
- package/{engine → runtime/engine}/topologies/tilt/manifest/loader.star +2 -2
- package/{engine → runtime/engine}/topologies/tilt/manifest/schema.star +1 -1
- package/{engine → runtime/engine}/topologies/tilt/manifest/yaml_to_json.py +1 -1
- package/{engine → runtime/engine}/topologies/tilt/resources/build_concurrency.star +3 -3
- package/{engine → runtime/engine}/topologies/tilt/resources/databases.star +7 -6
- package/{engine → runtime/engine}/topologies/tilt/resources/infra-loader.star +12 -12
- package/{engine → runtime/engine}/topologies/tilt/resources/libs_paths.star +1 -1
- package/{engine → runtime/engine}/topologies/tilt/resources/libs_resource_definition.star +2 -2
- package/{engine → runtime/engine}/topologies/tilt/resources/libs_setup.star +1 -1
- package/{engine → runtime/engine}/topologies/tilt/resources/orchestrator/apply_compose_resource_registration.star +36 -28
- package/{engine → runtime/engine}/topologies/tilt/resources/orchestrator/apply_migrator_orchestration.star +1 -1
- package/{engine → runtime/engine}/topologies/tilt/resources/orchestrator/generators/frontend.star +5 -5
- package/{engine → runtime/engine}/topologies/tilt/resources/orchestrator/generators/manifest_resource.star +4 -4
- package/{engine → runtime/engine}/topologies/tilt/resources/watchers.star +20 -20
- package/{engine → runtime/engine}/where-things-live.star +5 -5
- package/{ext → runtime/ext}/Tiltfile +5 -5
- package/{ext → runtime/ext}/ide-components/code_viewer/server.py +1 -1
- package/{ext → runtime/ext}/ide-components/config_inspector/server.py +2 -2
- package/{ext → runtime/ext}/ide-components/file_browser/server.py +1 -1
- package/{ext → runtime/ext}/ide-components/shared/config_service.py +2 -2
- package/{ext → runtime/ext}/ide-components/shared/file_utils.py +2 -2
- package/{ext → runtime/ext}/ide-components/shared/http_utils.py +1 -1
- package/{ext → runtime/ext}/ide-components/shared/syntax_highlighter.py +1 -1
- package/{ext → runtime/ext}/ide-components/shared/template_engine.py +1 -1
- package/{ext → runtime/ext}/ide-components/shared/templates/base.html +1 -1
- package/{ext → runtime/ext}/ide-components/shared/tilt_integration.py +1 -1
- package/{ext → runtime/ext}/ui-enhancements/tiltfile.py +1 -1
- package/runtime/platform/services/platform/proxy/service.yaml +14 -0
- package/{shared-platform-engineering → runtime/shared-platform-engineering}/docker-templates/infisical-entrypoint.sh +2 -2
- package/{shared-platform-engineering → runtime/shared-platform-engineering}/docker-templates/install-deps.sh +2 -2
- package/cli/dist/commands/__tests__/project-e2e-helpers.js +0 -49
- package/cli/dist/commands/__tests__/ui-loading-screen.test.js +0 -16
- package/cli/dist/generator/__tests__/golden-helpers.js +0 -43
- package/cli/dist-bundle/chunk-42IVF3YT.js +0 -3
- package/cli/dist-bundle/chunk-AT5MFZ3D.js +0 -10
- package/cli/dist-bundle/chunk-BHWJU6HY.js +0 -2
- package/cli/dist-bundle/chunk-DWR3LLHS.js +0 -2
- package/cli/dist-bundle/chunk-GB6DJJ5N.js +0 -57
- package/cli/dist-bundle/chunk-ODYL6LET.js +0 -52
- package/cli/dist-bundle/chunk-YTXQPTCN.js +0 -35
- package/cli/dist-bundle/chunk-Z2C55UFP.js +0 -7
- package/cli/dist-bundle/cold-preflight-7PFKXNK7.js +0 -2
- package/cli/dist-bundle/colima-SVZX2UML.js +0 -2
- package/cli/dist-bundle/extension-fetch-6XNTDF44.js +0 -2
- package/cli/dist-bundle/native-windows-X5XVLFJS.js +0 -2
- package/cli/dist-bundle/open-VJZ7W4JR.js +0 -2
- package/cli/dist-bundle/project-QSH7LOWI.js +0 -2
- package/cli/dist-bundle/project-templates-JDRE7AVL.js +0 -2
- package/cli/dist-bundle/tilt-port-owner-SMN5SAQJ.js +0 -2
- package/cli/dist-bundle/url-actions-D6ROTHZG.js +0 -2
- package/discovery/test_resource_snapshot.py +0 -253
- package/engine/assets/docker/wake-gateway/decide.test.ts +0 -177
- package/engine/topologies/tilt/manifest/tests/test_integration.star +0 -278
- package/engine/topologies/tilt/manifest/tests/test_loader_parser.star +0 -475
- package/engine/topologies/tilt/manifest/tests/test_manifest.star +0 -319
- package/engine/topologies/tilt/manifest/tests/test_validator.star +0 -472
- package/ext/ide-components/shared/test_config_service.py +0 -328
- /package/cli/bin/{tdk.js → flisk.js} +0 -0
- /package/{discovery → runtime/discovery}/filtering.star +0 -0
- /package/{discovery → runtime/discovery}/identity-management-frontend/service.yaml +0 -0
- /package/{discovery → runtime/discovery}/identity-sdk/service.yaml +0 -0
- /package/{discovery → runtime/discovery}/indexing.star +0 -0
- /package/{discovery → runtime/discovery}/loading.star +0 -0
- /package/{discovery → runtime/discovery}/manifest/validation.star +0 -0
- /package/{discovery → runtime/discovery}/normalization.star +0 -0
- /package/{discovery → runtime/discovery}/schemas.star +0 -0
- /package/{discovery → runtime/discovery}/services/platform/cdc/debezium/nats-connector/service.yaml +0 -0
- /package/{discovery → runtime/discovery}/services/platform/cdc/nats-http-bridge/service.yaml +0 -0
- /package/{discovery → runtime/discovery}/services/platform/synthetic-monitor/service.yaml +0 -0
- /package/{discovery → runtime/discovery}/validation.star +0 -0
- /package/{discovery → runtime/discovery}/versioning.star +0 -0
- /package/{engine → runtime/engine}/REFACTORING_MANIFEST_SYSTEM.md +0 -0
- /package/{engine → runtime/engine}/assets/docker/wake-gateway/decide.ts +0 -0
- /package/{engine → runtime/engine}/assets/docker/wake-gateway/server.ts +0 -0
- /package/{engine → runtime/engine}/assets/scripts/cleanup-completed-migrator-images.sh +0 -0
- /package/{engine → runtime/engine}/assets/scripts/cleanup-tilt-images.sh +0 -0
- /package/{engine → runtime/engine}/assets/scripts/mac-m1-resource-monitor.sh +0 -0
- /package/{engine → runtime/engine}/config.star +0 -0
- /package/{engine → runtime/engine}/lifecycle/orchestrator.star +0 -0
- /package/{engine → runtime/engine}/scripts/README.md +0 -0
- /package/{engine → runtime/engine}/scripts/build-and-publish-lib.sh +0 -0
- /package/{engine → runtime/engine}/scripts/check-lib-publish.sh +0 -0
- /package/{engine → runtime/engine}/scripts/generate-manifest.sh +0 -0
- /package/{engine → runtime/engine}/spec.master.example +0 -0
- /package/{engine → runtime/engine}/topologies/platform/docker/AGENTS.md +0 -0
- /package/{engine → runtime/engine}/topologies/platform/docker/auth/auth.star +0 -0
- /package/{engine → runtime/engine}/topologies/platform/docker/build/frontend_build_plan.star +0 -0
- /package/{engine → runtime/engine}/topologies/platform/docker/build/golden_image.star +0 -0
- /package/{engine → runtime/engine}/topologies/platform/docker/compose/compose_helpers.star +0 -0
- /package/{engine → runtime/engine}/topologies/platform/docker/compose/unsafe_value.star +0 -0
- /package/{engine → runtime/engine}/topologies/platform/docker/config/bunignore.star +0 -0
- /package/{engine → runtime/engine}/topologies/platform/docker/config/dockerignore.star +0 -0
- /package/{engine → runtime/engine}/topologies/platform/docker/dockerfile/dockerfile.star +0 -0
- /package/{engine → runtime/engine}/topologies/platform/docker/generators/golden_docker_generator_v2.star +0 -0
- /package/{engine → runtime/engine}/topologies/platform/docker/index.star +0 -0
- /package/{engine → runtime/engine}/topologies/platform/docker/layers/bun_helpers.star +0 -0
- /package/{engine → runtime/engine}/topologies/platform/docker/layers/infisical/index.star +0 -0
- /package/{engine → runtime/engine}/topologies/platform/docker/layers/infisical/infisical_docker.star +0 -0
- /package/{engine → runtime/engine}/topologies/platform/docker/layers/prisma/db_readiness.star +0 -0
- /package/{engine → runtime/engine}/topologies/platform/docker/layers/prisma/filesystem_setup.star +0 -0
- /package/{engine → runtime/engine}/topologies/platform/docker/layers/prisma/migrate_script.star +0 -0
- /package/{engine → runtime/engine}/topologies/platform/docker/layers/prisma/prisma_build.star +0 -0
- /package/{engine → runtime/engine}/topologies/platform/docker/layers/prisma/prisma_runtime.star +0 -0
- /package/{engine → runtime/engine}/topologies/platform/docker/layers/prisma/secret_resolution.star +0 -0
- /package/{engine → runtime/engine}/topologies/platform/docker/networking/traefik.star +0 -0
- /package/{engine → runtime/engine}/topologies/platform/docker/networking/traefik_constants.star +0 -0
- /package/{engine → runtime/engine}/topologies/platform/docker/networking/traefik_helpers.star +0 -0
- /package/{engine → runtime/engine}/topologies/platform/net/AGENTS.md +0 -0
- /package/{engine → runtime/engine}/topologies/platform/net/proxy.star +0 -0
- /package/{engine → runtime/engine}/topologies/platform/registries/local.star +0 -0
- /package/{engine → runtime/engine}/topologies/platform/security/AGENTS.md +0 -0
- /package/{engine → runtime/engine}/topologies/platform/state/AGENTS.md +0 -0
- /package/{engine → runtime/engine}/topologies/platform/state/relational.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/common/AGENTS.md +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/common/utils_docker_networks.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/common/utils_output.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/config/AGENTS.md +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/config/defaults.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/config/feature_flags.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/config/global.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/generators/api_gateway.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/generators/index.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/generators/infisical/examples.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/generators/infisical/index.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/generators/infisical/machine_identity.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/generators/infisical/path_manager.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/generators/infisical/secrets_generator.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/generators/nginx_conf.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/generators/tsconfig.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/generators/typescript/backend_library_tsconfig.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/generators/typescript/common.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/generators/typescript/frontend_library_tsconfig.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/generators/typescript/frontend_tsconfig.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/generators/typescript/include.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/generators/typescript/prisma_config.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/generators/validators.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/generators/vite/backend.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/generators/vite/frameworks/lit.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/generators/vite/frameworks/preact.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/generators/vite/frameworks/qwik.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/generators/vite/frameworks/react.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/generators/vite/frameworks/solid.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/generators/vite/frameworks/svelte.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/generators/vite/frameworks/vanilla.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/generators/vite/frameworks/vue.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/generators/vite/frontend.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/generators/vite/generators.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/generators/vite/library.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/generators/vite/sdk.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/generators/vite_config.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/manifest/AGENTS.md +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/manifest/README.md +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/manifest/__init__.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/manifest/constants.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/manifest/errors.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/manifest/integration.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/manifest/mapper.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/manifest/parser.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/manifest/validator.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/resources/AGENTS.md +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/resources/conditions.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/resources/declaration.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/resources/deps.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/resources/libs.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/resources/libs_discovery.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/resources/libs_tsconfig.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/resources/orchestrator/apply.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/resources/orchestrator/apply_manifest_orchestration.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/resources/orchestrator/apply_resource_validation.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/resources/orchestrator/apply_runtime_flags.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/resources/orchestrator/builders/typescript.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/resources/orchestrator/generators/dependencies/AGENTS.md +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/resources/orchestrator/generators/dependencies/index.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/resources/orchestrator/generators/dependencies/resolver.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/resources/orchestrator/generators/env.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/resources/orchestrator/helpers.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/resources/orchestrator.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/resources/ordering.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/resources/shared-platform-postgres.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/resources/triggers.star +0 -0
- /package/{ext → runtime/ext}/ide-components/README.md +0 -0
- /package/{ext → runtime/ext}/ide-components/shared/static/styles.css +0 -0
- /package/{ext → runtime/ext}/ui-enhancements/cron-status-server.sh +0 -0
- /package/{ext → runtime/ext}/ui-enhancements/cron-status-tracker.sh +0 -0
- /package/{ext → runtime/ext}/ui-enhancements/extension.yaml +0 -0
- /package/{ext → runtime/ext}/ui-enhancements/ui/cron-jobs-tab.css +0 -0
- /package/{ext → runtime/ext}/ui-enhancements/ui/help-panel.css +0 -0
- /package/{ext → runtime/ext}/ui-enhancements/ui/icons.css +0 -0
- /package/{ext → runtime/ext}/ui-enhancements/ui/tooltips.css +0 -0
- /package/{shared-platform-engineering → runtime/shared-platform-engineering}/docker-templates/bun-hoisted-symlink-fix.sh +0 -0
- /package/{shared-platform-engineering → runtime/shared-platform-engineering}/docker-templates/prisma-bun-client-link-fix.sh +0 -0
- /package/{shared-platform-engineering → runtime/shared-platform-engineering}/docker-templates/prisma-normalize-client.sh +0 -0
- /package/{specs → runtime/specs}/specs/TILT_SERVICE_DEFAULTS.star +0 -0
- /package/{specs → runtime/specs}/specs/TILT_TECH_STACK.star +0 -0
|
@@ -159,7 +159,7 @@ def get_resource_by_name(name):
|
|
|
159
159
|
|
|
160
160
|
**Autogenerated Services List:**
|
|
161
161
|
```starlark
|
|
162
|
-
# .
|
|
162
|
+
# .flisk/.flisk-out/product_autogenerated_resource_manifests/services.autogenerated.star
|
|
163
163
|
APP_RESOURCES_AUTOGENERATED = [
|
|
164
164
|
{
|
|
165
165
|
'name': 'order-planner',
|
|
@@ -230,7 +230,7 @@ def generate_backend(path, prisma_path, write_fn, internal_deps, is_docker):
|
|
|
230
230
|
def generate_app_dockerfile(path, resource_name, start_command):
|
|
231
231
|
return '''
|
|
232
232
|
# L1: Golden Image Base
|
|
233
|
-
FROM
|
|
233
|
+
FROM flisk/golden-image-l1:latest AS base
|
|
234
234
|
|
|
235
235
|
# L2: Dependency Installation
|
|
236
236
|
FROM base AS deps
|
|
@@ -340,13 +340,13 @@ def generate_traefik_labels(resource_name, port, host, path_prefix):
|
|
|
340
340
|
```starlark
|
|
341
341
|
# engine/topologies/tilt/resources/deps.star
|
|
342
342
|
def discover_resource_libraries(ctx, resource_path):
|
|
343
|
-
"""Discovers @
|
|
343
|
+
"""Discovers @flisk/* dependencies from package.json"""
|
|
344
344
|
package_json = read_json(resource_path + "/package.json")
|
|
345
345
|
deps = package_json.get("dependencies", {})
|
|
346
346
|
|
|
347
347
|
return [
|
|
348
348
|
name for name in deps.keys()
|
|
349
|
-
if name.startswith("@
|
|
349
|
+
if name.startswith("@flisk/")
|
|
350
350
|
]
|
|
351
351
|
|
|
352
352
|
def setup_libraries(ctx, should_enable, DDD_LIBS, PLATFORM_LIBS, PRODUCT_LIBS, generators):
|
|
@@ -385,7 +385,7 @@ def setup_libraries(ctx, should_enable, DDD_LIBS, PLATFORM_LIBS, PRODUCT_LIBS, g
|
|
|
385
385
|
```
|
|
386
386
|
❌ DON'T MODIFY:
|
|
387
387
|
- **/autogenerated/*.autogenerated.*
|
|
388
|
-
- .
|
|
388
|
+
- .flisk/.flisk-out/product_autogenerated_*/*
|
|
389
389
|
- **/services.autogenerated.star
|
|
390
390
|
- **/domains.autogenerated.star
|
|
391
391
|
```
|
|
@@ -411,7 +411,7 @@ runtime dependency between them - see infra-loader.star's _load_* functions):
|
|
|
411
411
|
golden-image (L1-L4, built first as a Docker layer-cache optimization,
|
|
412
412
|
not a runtime dependency of anything below)
|
|
413
413
|
database-management (postgres) - Free, on by default
|
|
414
|
-
verdaccio (npm registry) - Premium, requires
|
|
414
|
+
verdaccio (npm registry) - Premium, requires FLISK_LICENSE_KEY
|
|
415
415
|
infisical, proxy, monitoring, debezium, elk - independent, opt-in
|
|
416
416
|
|
|
417
417
|
Per-Service:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# .tilt-engine/
|
|
2
2
|
|
|
3
|
-
> **Contributing to the current engine:** follow the [engine and discovery recipe](
|
|
3
|
+
> **Contributing to the current engine:** follow the [engine and discovery recipe](../../docs/contributing/02-feature-recipes.md#change-the-engine-or-service-discovery). This README contains older architecture notes; check paths against the current `engine/topologies/` source before relying on them.
|
|
4
4
|
|
|
5
5
|
**Tilt Platform Framework Code**
|
|
6
6
|
|
|
@@ -24,7 +24,7 @@ This directory contains the Flisk Landscape Tilt infrastructure framework - the
|
|
|
24
24
|
|
|
25
25
|
When you see `.tilt-engine/` in paths, know that this is framework code (not generated output).
|
|
26
26
|
|
|
27
|
-
Generated/output files go in `.
|
|
27
|
+
Generated/output files go in `.flisk/.flisk-out/` (which is gitignored).
|
|
28
28
|
|
|
29
29
|
## Learn More
|
|
30
30
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# =============================================================================
|
|
2
|
-
# 🎯
|
|
2
|
+
# 🎯 Flisk-ENGINE - Core Execution Engine
|
|
3
3
|
# =============================================================================
|
|
4
|
-
# This is the Tiltfile entry point for the
|
|
4
|
+
# This is the Tiltfile entry point for the flisk-engine repo.
|
|
5
5
|
# It exports core orchestration, resource builders, and topology management.
|
|
6
6
|
#
|
|
7
7
|
# Usage:
|
|
8
|
-
# v1alpha1.extension_repo(name='
|
|
9
|
-
# load('ext://
|
|
8
|
+
# v1alpha1.extension_repo(name='flisk-engine', url='https://github.com/flisk-sh/flisk')
|
|
9
|
+
# load('ext://flisk-engine', 'Utils', 'Manifest', 'Config', ...)
|
|
10
10
|
# =============================================================================
|
|
11
11
|
|
|
12
12
|
# Core
|
|
@@ -83,4 +83,4 @@ Watchers = _Watchers
|
|
|
83
83
|
# True when a manifest's deferStart is actually active (licensed); decides whether a `<name>-image` prebuild resource exists.
|
|
84
84
|
resource_defers_start = _resource_defers_start
|
|
85
85
|
|
|
86
|
-
print("✅
|
|
86
|
+
print("✅ Flisk Engine loaded: orchestration, resources, and lifecycle")
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
# 2. Or update service.json
|
|
8
8
|
#
|
|
9
9
|
# Generation Source: GoldenImage.generate_layered_dockerfile()
|
|
10
|
-
# Service:
|
|
10
|
+
# Service: flisk-project-l1-l4
|
|
11
11
|
# Type: GOLDEN LAYERED IMAGES | L1-L4 Pre-built Layers
|
|
12
12
|
###############################################################################
|
|
13
13
|
|
|
@@ -15,14 +15,14 @@
|
|
|
15
15
|
# 🏗️ GOLDEN LAYERED IMAGES - Multi-Stage Base Images
|
|
16
16
|
# =============================================================================
|
|
17
17
|
# This Dockerfile builds 8 golden images:
|
|
18
|
-
# -
|
|
19
|
-
# -
|
|
20
|
-
# -
|
|
21
|
-
# -
|
|
22
|
-
# -
|
|
23
|
-
# -
|
|
24
|
-
# -
|
|
25
|
-
# -
|
|
18
|
+
# - flisk-project-l1:latest - OS base + Bun runtime
|
|
19
|
+
# - flisk-project-l2:latest - Dependencies installed
|
|
20
|
+
# - flisk-project-l3-backend:latest - Backend and migrator build tools (Prisma, no Infisical CLI)
|
|
21
|
+
# - flisk-project-l3-frontend:latest - Frontend build tools (no Prisma)
|
|
22
|
+
# - flisk-project-l4-backend:latest - Backend production runtime (Bun)
|
|
23
|
+
# - flisk-project-l4-backend-node:latest - Backend production runtime (Node.js)
|
|
24
|
+
# - flisk-project-l4-frontend:latest - Frontend production runtime (Nginx)
|
|
25
|
+
# - flisk-project-l4-migrator:latest - Migrator production runtime
|
|
26
26
|
#
|
|
27
27
|
# Migrators build on l3-backend: a separate l3-migrator stage installed the same Prisma
|
|
28
28
|
# and produced identical layers under a second image name.
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
# =============================================================================
|
|
42
42
|
FROM oven/bun:1.3.11-alpine@sha256:7ed9f74c326d1c260abe247ac423ccbf5ac92af62bb442d515d1f92f21e8ea9b AS l1_golden
|
|
43
43
|
|
|
44
|
-
LABEL layer="l1" description="OS base with runtime environment" maintainer="
|
|
44
|
+
LABEL layer="l1" description="OS base with runtime environment" maintainer="flisk-project"
|
|
45
45
|
|
|
46
46
|
# System dependencies for all services
|
|
47
47
|
RUN apk add --no-cache ca-certificates tzdata curl file bash openssl
|
|
@@ -60,7 +60,7 @@ WORKDIR /app
|
|
|
60
60
|
# =============================================================================
|
|
61
61
|
FROM l1_golden AS l2_golden
|
|
62
62
|
|
|
63
|
-
LABEL layer="l2" description="Base with common dependencies installed" maintainer="
|
|
63
|
+
LABEL layer="l2" description="Base with common dependencies installed" maintainer="flisk-project"
|
|
64
64
|
|
|
65
65
|
# Install minimal debugging tools (removed: vim, python3, make, g++ = -67MB)
|
|
66
66
|
RUN apk add --no-cache curl netcat-openbsd jq bind-tools
|
|
@@ -77,7 +77,7 @@ RUN echo "Bun version: $(bun --version)"
|
|
|
77
77
|
# =============================================================================
|
|
78
78
|
FROM l2_golden AS l3_backend_golden
|
|
79
79
|
|
|
80
|
-
LABEL layer="l3-backend" description="Backend build tools with Prisma" maintainer="
|
|
80
|
+
LABEL layer="l3-backend" description="Backend build tools with Prisma" maintainer="flisk-project"
|
|
81
81
|
|
|
82
82
|
# Install Prisma CLI globally (pinned for deterministic builds)
|
|
83
83
|
RUN bun add -g prisma@7.5.0 @prisma/client@7.5.0
|
|
@@ -97,7 +97,7 @@ RUN echo "Prisma version: $(bunx prisma --version | head -1)"
|
|
|
97
97
|
# =============================================================================
|
|
98
98
|
FROM l2_golden AS l3_frontend_golden
|
|
99
99
|
|
|
100
|
-
LABEL layer="l3-frontend" description="Frontend build tools without Prisma" maintainer="
|
|
100
|
+
LABEL layer="l3-frontend" description="Frontend build tools without Prisma" maintainer="flisk-project"
|
|
101
101
|
|
|
102
102
|
# Frontend doesn't need Prisma, just verify Bun
|
|
103
103
|
RUN echo "Bun version: $(bun --version)"
|
|
@@ -108,7 +108,7 @@ RUN echo "Bun version: $(bun --version)"
|
|
|
108
108
|
# =============================================================================
|
|
109
109
|
FROM l1_golden AS l4_backend_bun
|
|
110
110
|
|
|
111
|
-
LABEL layer="l4-backend-bun" description="Backend production runtime (Bun)" maintainer="
|
|
111
|
+
LABEL layer="l4-backend-bun" description="Backend production runtime (Bun)" maintainer="flisk-project"
|
|
112
112
|
|
|
113
113
|
ENV NODE_ENV=production
|
|
114
114
|
|
|
@@ -133,7 +133,7 @@ WORKDIR /app
|
|
|
133
133
|
# =============================================================================
|
|
134
134
|
FROM node:22-alpine@sha256:0a7108bf6c7bf5de370ffb1a3ed6be93d405b43ff159f681a8d18c0e2bc2e402 AS l4_backend_node
|
|
135
135
|
|
|
136
|
-
LABEL layer="l4-backend-node" description="Backend production runtime (Node.js - lightweight)" maintainer="
|
|
136
|
+
LABEL layer="l4-backend-node" description="Backend production runtime (Node.js - lightweight)" maintainer="flisk-project"
|
|
137
137
|
|
|
138
138
|
ENV NODE_ENV=production
|
|
139
139
|
|
|
@@ -163,7 +163,7 @@ FROM l4_backend_bun AS l4_backend_golden
|
|
|
163
163
|
# =============================================================================
|
|
164
164
|
FROM nginx:1.27-alpine@sha256:65645c7bb6a0661892a8b03b89d0743208a18dd2f3f17a54ef4b76fb8e2f2a10 AS l4_frontend_golden
|
|
165
165
|
|
|
166
|
-
LABEL layer="l4-frontend" description="Frontend production runtime with Nginx" maintainer="
|
|
166
|
+
LABEL layer="l4-frontend" description="Frontend production runtime with Nginx" maintainer="flisk-project"
|
|
167
167
|
|
|
168
168
|
ENV NODE_ENV=production
|
|
169
169
|
|
|
@@ -181,7 +181,7 @@ WORKDIR /usr/share/nginx/html
|
|
|
181
181
|
# =============================================================================
|
|
182
182
|
FROM l1_golden AS l4_migrator_golden
|
|
183
183
|
|
|
184
|
-
LABEL layer="l4-migrator" description="Migrator runtime with Prisma" maintainer="
|
|
184
|
+
LABEL layer="l4-migrator" description="Migrator runtime with Prisma" maintainer="flisk-project"
|
|
185
185
|
|
|
186
186
|
ENV NODE_ENV=production
|
|
187
187
|
|
|
@@ -23,6 +23,13 @@ RUN apk add --no-cache docker-cli docker-cli-compose curl gcompat \
|
|
|
23
23
|
WORKDIR /app
|
|
24
24
|
COPY decide.ts server.ts ./
|
|
25
25
|
|
|
26
|
+
# Run as the image's unprivileged `bun` user. Docker socket access comes from
|
|
27
|
+
# the supplementary group in traefik_standalone.star (group_add), not from root.
|
|
28
|
+
# HOME points at bun's home so `tilt trigger` finds the session token mounted
|
|
29
|
+
# at $HOME/.tilt-dev.
|
|
30
|
+
ENV HOME=/home/bun
|
|
31
|
+
USER bun
|
|
32
|
+
|
|
26
33
|
EXPOSE 9999
|
|
27
34
|
HEALTHCHECK --interval=10s --timeout=3s --start-period=10s --retries=3 CMD curl --fail --silent http://127.0.0.1:${PORT:-9999}/health || exit 1
|
|
28
35
|
CMD ["bun", "run", "server.ts"]
|
|
@@ -86,7 +86,7 @@ if _AUTO_DISCOVER_ENABLED:
|
|
|
86
86
|
# Use unique name to avoid conflicts on reload
|
|
87
87
|
local_resource(
|
|
88
88
|
name="service-discovery-daemon-v2",
|
|
89
|
-
serve_cmd="cd
|
|
89
|
+
serve_cmd=["sh", "-c", 'cd "$1" && python3 discovery/resource_snapshot.py watch', "sh", os.getcwd()],
|
|
90
90
|
deps=["services/product"],
|
|
91
91
|
auto_init=True,
|
|
92
92
|
labels=["infra", "discovery"],
|
|
@@ -564,17 +564,17 @@ FEATURES = struct(
|
|
|
564
564
|
# =============================================================================
|
|
565
565
|
|
|
566
566
|
# Load project name for system identity
|
|
567
|
-
# Use
|
|
567
|
+
# Use FLISK_PROJECT_ROOT env var set by Tilt, fallback to current directory
|
|
568
568
|
def _load_system_name_prefix():
|
|
569
|
-
project_root = os.environ.get('
|
|
570
|
-
project_json_path = '.
|
|
569
|
+
project_root = os.environ.get('FLISK_PROJECT_ROOT', '')
|
|
570
|
+
project_json_path = '.flisk/project.json'
|
|
571
571
|
if project_root:
|
|
572
572
|
project_json_path = project_root + '/' + project_json_path
|
|
573
573
|
|
|
574
574
|
if os.path.exists(project_json_path):
|
|
575
575
|
_project_json = read_json(project_json_path)
|
|
576
|
-
return _project_json.get('project', {}).get('name', '
|
|
577
|
-
return '
|
|
576
|
+
return _project_json.get('project', {}).get('name', 'flisk-project')
|
|
577
|
+
return 'flisk-project'
|
|
578
578
|
|
|
579
579
|
_SYSTEM_NAME_PREFIX = _load_system_name_prefix()
|
|
580
580
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
3
|
"$id": "https://flisk.sh/project-schema.json",
|
|
4
4
|
"title": "Flisk Project Configuration",
|
|
5
|
-
"description": "Editor assistance for .
|
|
5
|
+
"description": "Editor assistance for .flisk/project.json. The Flisk CLI remains the runtime source of truth.",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"additionalProperties": true,
|
|
8
8
|
"required": [
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"version": {
|
|
17
17
|
"type": "string"
|
|
18
18
|
},
|
|
19
|
-
"
|
|
19
|
+
"minFliskVersion": {
|
|
20
20
|
"type": "string",
|
|
21
21
|
"pattern": "^\\d+\\.\\d+\\.\\d+$",
|
|
22
22
|
"description": "Oldest flisk CLI this project works with, as MAJOR.MINOR.PATCH. flisk doctor fails on an older CLI."
|
|
@@ -138,12 +138,12 @@
|
|
|
138
138
|
"type": "string"
|
|
139
139
|
},
|
|
140
140
|
"basePath": {
|
|
141
|
-
"description": "Base path for frontend routing on
|
|
141
|
+
"description": "Base path for frontend routing on flisk.localhost. Default is /{stack}s when omitted.",
|
|
142
142
|
"pattern": "^/[a-z0-9/-]*$",
|
|
143
143
|
"type": "string"
|
|
144
144
|
},
|
|
145
145
|
"databaseName": {
|
|
146
|
-
"description": "Override auto-generated DB name.\nDefault:
|
|
146
|
+
"description": "Override auto-generated DB name.\nDefault: FLISK_{stack}",
|
|
147
147
|
"pattern": "^Flisk_[a-z_]+$",
|
|
148
148
|
"type": "string"
|
|
149
149
|
},
|
|
@@ -185,7 +185,7 @@
|
|
|
185
185
|
"type": "string"
|
|
186
186
|
},
|
|
187
187
|
"stack": {
|
|
188
|
-
"description": "Technology stack this resource belongs to.\nUsed for:\n• Database naming:
|
|
188
|
+
"description": "Technology stack this resource belongs to.\nUsed for:\n• Database naming: FLISK_{stack}\n• Traefik routing: /api/{stack}\n• NATS queue: {stack}_backend_svc",
|
|
189
189
|
"type": "string"
|
|
190
190
|
},
|
|
191
191
|
"params": {
|
|
@@ -196,7 +196,7 @@
|
|
|
196
196
|
"type": "object"
|
|
197
197
|
},
|
|
198
198
|
"secrets": {
|
|
199
|
-
"description": "Names of secrets the resource needs. By default each is read from the project .env (gitignored) and injected into the container; with
|
|
199
|
+
"description": "Names of secrets the resource needs. By default each is read from the project .env (gitignored) and injected into the container; with FLISK_SECRET_PROVIDER=infisical they are left to Infisical. NO secret values in params/envVars or anywhere in service.json.",
|
|
200
200
|
"properties": {
|
|
201
201
|
"required": {
|
|
202
202
|
"description": "Required secret names. The resource does not start if any is missing from the project .env.",
|
|
@@ -348,7 +348,7 @@
|
|
|
348
348
|
"type": "integer"
|
|
349
349
|
},
|
|
350
350
|
"sablier": {
|
|
351
|
-
"description": "On-demand scaling: stop this container when idle, wake it on the next request.\nNot recommended for databases or other stateful resources with in-flight writes.\n(Premium - requires
|
|
351
|
+
"description": "On-demand scaling: stop this container when idle, wake it on the next request.\nNot recommended for databases or other stateful resources with in-flight writes.\n(Premium - requires FLISK_LICENSE_KEY; see hasSablierLicense() in extension-fetch.ts)",
|
|
352
352
|
"properties": {
|
|
353
353
|
"enable": {
|
|
354
354
|
"default": false,
|
|
@@ -15,9 +15,9 @@ YELLOW='\033[1;33m'
|
|
|
15
15
|
BLUE='\033[0;34m'
|
|
16
16
|
NC='\033[0m' # No Color
|
|
17
17
|
|
|
18
|
-
# Container name filter: project name from .
|
|
19
|
-
PROJECT_FILTER="${
|
|
20
|
-
PROJECT_FILTER="${PROJECT_FILTER:-
|
|
18
|
+
# Container name filter: project name from .flisk/project.json (override with FLISK_PROJECT_NAME)
|
|
19
|
+
PROJECT_FILTER="${FLISK_PROJECT_NAME:-$(sed -n 's/.*"name"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p' .flisk/project.json 2>/dev/null | head -1)}"
|
|
20
|
+
PROJECT_FILTER="${PROJECT_FILTER:-flisk-project}"
|
|
21
21
|
PROJECT_FILTER="${PROJECT_FILTER//-/[-_]}"
|
|
22
22
|
|
|
23
23
|
# Help text
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
|
|
63
63
|
# PROJECT_ROOT is automatically set by Tiltfile based on where you run `tilt up`.
|
|
64
64
|
# You don't need to set it. Example:
|
|
65
|
-
# - If you run in /home/dev/
|
|
65
|
+
# - If you run in /home/dev/flisk-project, PROJECT_ROOT = "/home/dev/flisk-project"
|
|
66
66
|
# - All other paths are built from this root.
|
|
67
67
|
#
|
|
68
68
|
# This file is manually maintained to match the directory structure.
|
|
@@ -341,7 +341,7 @@ SPEC = struct(
|
|
|
341
341
|
SHARED_DIR = PROJECT_ROOT + "/shared",
|
|
342
342
|
|
|
343
343
|
# Topology paths - ALL EXPLICIT
|
|
344
|
-
# NOTE: These paths are relative to
|
|
344
|
+
# NOTE: These paths are relative to Flisk CLI installation root (engine/ directory)
|
|
345
345
|
TOPOLOGIES = struct(
|
|
346
346
|
BASE = PROJECT_ROOT + "/engine/topologies",
|
|
347
347
|
PLATFORM = PROJECT_ROOT + "/engine/topologies/platform",
|
|
@@ -563,7 +563,7 @@ FEATURES = struct(
|
|
|
563
563
|
|
|
564
564
|
CONSTANTS = struct(
|
|
565
565
|
# System identity - EXPLICIT
|
|
566
|
-
SYSTEM_NAME = "
|
|
566
|
+
SYSTEM_NAME = "flisk-project-tilt-platform",
|
|
567
567
|
SYSTEM_VERSION = "2.0.0",
|
|
568
568
|
|
|
569
569
|
# Runtimes - EXPLICIT supported options
|
|
@@ -13,11 +13,11 @@ This folder holds the Starlark modules that turn `service.json` manifests into D
|
|
|
13
13
|
|
|
14
14
|
Paths below are relative to the repository root. The order is the order things run.
|
|
15
15
|
|
|
16
|
-
1. **Generate the project Tiltfile.** `flisk up` (or `flisk config regenerate`) renders `.
|
|
17
|
-
2. **Discover and validate manifests.** The generated Tiltfile calls `Manifest.load_all(...)`. Discovery, normalization and the field checks live in [`discovery/loading.star`](../../discovery/loading.star), [`discovery/json_manifest_scanner.star`](../../discovery/json_manifest_scanner.star), [`discovery/manifest/normalize.star`](../../discovery/manifest/normalize.star) and [`discovery/manifest/validation.star`](../../discovery/manifest/validation.star). Parsing helpers and constants are in [`tilt/manifest/parser.star`](tilt/manifest/parser.star) and [`tilt/manifest/constants.star`](tilt/manifest/constants.star). The `dependsOn` check you see from `flisk config verify` is in [`cli/src/commands/config.ts`](
|
|
16
|
+
1. **Generate the project Tiltfile.** `flisk up` (or `flisk config regenerate`) renders `.flisk/.flisk-out/Tiltfile` from [`cli/templates/Tiltfile.hbs`](../../../cli/templates/Tiltfile.hbs). It loads the engine through the root [`Tiltfile`](../../Tiltfile), which re-exports `Manifest`, `Orchestrator`, `Infra` and the rest.
|
|
17
|
+
2. **Discover and validate manifests.** The generated Tiltfile calls `Manifest.load_all(...)`. Discovery, normalization and the field checks live in [`discovery/loading.star`](../../discovery/loading.star), [`discovery/json_manifest_scanner.star`](../../discovery/json_manifest_scanner.star), [`discovery/manifest/normalize.star`](../../discovery/manifest/normalize.star) and [`discovery/manifest/validation.star`](../../discovery/manifest/validation.star). Parsing helpers and constants are in [`tilt/manifest/parser.star`](tilt/manifest/parser.star) and [`tilt/manifest/constants.star`](tilt/manifest/constants.star). The `dependsOn` check you see from `flisk config verify` is in [`cli/src/commands/config.ts`](../../../cli/src/commands/config.ts).
|
|
18
18
|
3. **Orchestrate each resource.** The Tiltfile calls `Orchestrator.apply_service(...)`, which reaches [`tilt/resources/orchestrator/apply.star`](tilt/resources/orchestrator/apply.star). For each enabled stack it validates the resource, loads its manifest, registers the Compose resource and, for migrators, registers the migration job. The helpers are the `apply_*.star` files next to it. [`apply_compose_resource_registration.star`](tilt/resources/orchestrator/apply_compose_resource_registration.star) turns `dependsOn` into Tilt `resource_deps`.
|
|
19
19
|
4. **Generate the platform files.** The Docker modules under [`platform/docker/`](platform/docker/) write the files each resource needs: Compose entries in [`compose/compose.star`](platform/docker/compose/compose.star), Dockerfiles in [`dockerfile/dockerfile.star`](platform/docker/dockerfile/dockerfile.star) and the image layers in [`layers/`](platform/docker/layers/). Config generators such as `tsconfig` and Vite are in [`tilt/generators/`](tilt/generators/). Shared infrastructure (Traefik, Postgres) is loaded by [`tilt/resources/infra-loader.star`](tilt/resources/infra-loader.star).
|
|
20
|
-
5. **Read the generated project files.** The output lands in each resource's `.autogenerated/` folder, for example `docker-compose.app.autogenerated.yml` and `Dockerfile.app.autogenerated`. Do not edit these by hand; see [generated files](
|
|
20
|
+
5. **Read the generated project files.** The output lands in each resource's `.autogenerated/` folder, for example `docker-compose.app.autogenerated.yml` and `Dockerfile.app.autogenerated`. Do not edit these by hand; see [generated files](../../../docs/generated-files.md).
|
|
21
21
|
|
|
22
22
|
If you change a field in `service.json`, start at step 2. If a container is built or wired wrongly, start at step 3 or 4.
|
|
23
23
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
load('./golden_image_constants.star', 'GOLDEN_DOCKERFILE', 'GOLDEN_IMAGE_PREFIX', 'GOLDEN_LAYERS', 'LEGACY_GOLDEN_IMAGES')
|
|
6
6
|
|
|
7
7
|
# Label that records which golden Dockerfile an image was built from.
|
|
8
|
-
GOLDEN_HASH_LABEL = '
|
|
8
|
+
GOLDEN_HASH_LABEL = 'flisk.golden.hash'
|
|
9
9
|
|
|
10
10
|
# Shell template for the golden build. Placeholders (@@...@@) are replaced in
|
|
11
11
|
# build_golden_layers(); plain `$VAR` references are expanded by the shell.
|
|
@@ -17,7 +17,7 @@ ROOT="$(cd "$ROOT_REL" && pwd)"
|
|
|
17
17
|
HASH="$(cat "$DF" | (sha256sum 2>/dev/null || shasum -a 256) | cut -c1-64)"
|
|
18
18
|
IMAGES="@@IMAGES@@"
|
|
19
19
|
|
|
20
|
-
if [ -z "$
|
|
20
|
+
if [ -z "$FLISK_GOLDEN_REBUILD" ]; then
|
|
21
21
|
fresh=1
|
|
22
22
|
for img in $IMAGES; do
|
|
23
23
|
[ "$(docker image inspect -f '{{index .Config.Labels "@@HASH_LABEL@@"}}' "$img" 2>/dev/null)" = "$HASH" ] || fresh=0
|
|
@@ -74,14 +74,14 @@ def build_golden_layers(project_root='.'):
|
|
|
74
74
|
|
|
75
75
|
project_root: path back to the project root from wherever
|
|
76
76
|
local_resource cmds actually run (the Tiltfile's own directory,
|
|
77
|
-
.
|
|
77
|
+
.flisk/.flisk-out/ - not the project root), e.g. '../../'. GOLDEN_DOCKERFILE
|
|
78
78
|
is itself project-root-relative, so it must be prefixed with this to
|
|
79
79
|
resolve correctly - passing project_root='.' (the default) only works
|
|
80
80
|
when the Tiltfile happens to live at the project root.
|
|
81
81
|
|
|
82
82
|
The build is skipped when every golden image already exists with a
|
|
83
|
-
`
|
|
84
|
-
|
|
83
|
+
`flisk.golden.hash` label matching the current Dockerfile. Set
|
|
84
|
+
FLISK_GOLDEN_REBUILD=1 to force a rebuild. Otherwise all targets are built
|
|
85
85
|
with one `docker buildx bake`, falling back to serial `docker build` when
|
|
86
86
|
buildx is not installed.
|
|
87
87
|
"""
|
package/{engine → runtime/engine}/topologies/platform/docker/build/golden_image_constants.star
RENAMED
|
@@ -3,23 +3,23 @@
|
|
|
3
3
|
# =============================================================================
|
|
4
4
|
|
|
5
5
|
# Load project configuration to get the project name as prefix
|
|
6
|
-
# Falls back to '
|
|
7
|
-
# Use
|
|
6
|
+
# Falls back to 'flisk-project' if project.json is not found
|
|
7
|
+
# Use FLISK_PROJECT_ROOT env var set by Tilt, fallback to current directory
|
|
8
8
|
def _load_golden_prefix():
|
|
9
|
-
project_root = os.environ.get('
|
|
10
|
-
project_json_path = '.
|
|
9
|
+
project_root = os.environ.get('FLISK_PROJECT_ROOT', '')
|
|
10
|
+
project_json_path = '.flisk/project.json'
|
|
11
11
|
if project_root:
|
|
12
12
|
project_json_path = project_root + '/' + project_json_path
|
|
13
13
|
|
|
14
14
|
if os.path.exists(project_json_path):
|
|
15
15
|
_project_json = read_json(project_json_path)
|
|
16
|
-
return _project_json.get('project', {}).get('name', '
|
|
17
|
-
return '
|
|
16
|
+
return _project_json.get('project', {}).get('name', 'flisk-project')
|
|
17
|
+
return 'flisk-project'
|
|
18
18
|
|
|
19
19
|
_GOLDEN_IMAGE_PREFIX = _load_golden_prefix()
|
|
20
20
|
|
|
21
21
|
GOLDEN_IMAGE_PREFIX = _GOLDEN_IMAGE_PREFIX
|
|
22
|
-
GOLDEN_DOCKERFILE = '.
|
|
22
|
+
GOLDEN_DOCKERFILE = '.flisk/.flisk-out/golden-layers.Dockerfile'
|
|
23
23
|
|
|
24
24
|
GOLDEN_LAYERS = {
|
|
25
25
|
'l1': {
|
package/{engine → runtime/engine}/topologies/platform/docker/build/golden_image_dockerfile.star
RENAMED
|
@@ -7,17 +7,17 @@ load('../config/healthcheck.star', 'DOCKER_HEALTHCHECK', 'dockerfile_healthcheck
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
# Load project name for dynamic naming
|
|
10
|
-
# Use
|
|
10
|
+
# Use FLISK_PROJECT_ROOT env var set by Tilt, fallback to current directory
|
|
11
11
|
def _load_golden_prefix():
|
|
12
|
-
project_root = os.environ.get('
|
|
13
|
-
project_json_path = '.
|
|
12
|
+
project_root = os.environ.get('FLISK_PROJECT_ROOT', '')
|
|
13
|
+
project_json_path = '.flisk/project.json'
|
|
14
14
|
if project_root:
|
|
15
15
|
project_json_path = project_root + '/' + project_json_path
|
|
16
16
|
|
|
17
17
|
if os.path.exists(project_json_path):
|
|
18
18
|
_project_json = read_json(project_json_path)
|
|
19
|
-
return _project_json.get('project', {}).get('name', '
|
|
20
|
-
return '
|
|
19
|
+
return _project_json.get('project', {}).get('name', 'flisk-project')
|
|
20
|
+
return 'flisk-project'
|
|
21
21
|
|
|
22
22
|
_GOLDEN_PREFIX = _load_golden_prefix()
|
|
23
23
|
|
|
@@ -166,9 +166,9 @@ ENV BUN_OPTIONS=--smol
|
|
|
166
166
|
USER bun
|
|
167
167
|
|
|
168
168
|
# Backend-specific healthcheck: probes the service over HTTP. The image is shared by every backend,
|
|
169
|
-
# so the port and path come from the container env (PORT is set by compose,
|
|
169
|
+
# so the port and path come from the container env (PORT is set by compose, FLISK_HEALTH_PATH is optional).
|
|
170
170
|
HEALTHCHECK {hc_flags} \
|
|
171
|
-
CMD bun -e "fetch('http://127.0.0.1:'+process.env.PORT+(process.env.
|
|
171
|
+
CMD bun -e "fetch('http://127.0.0.1:'+process.env.PORT+(process.env.FLISK_HEALTH_PATH||'/health')).then(r=>process.exit(r.ok?0:1),()=>process.exit(1))" || exit 1
|
|
172
172
|
|
|
173
173
|
WORKDIR /app
|
|
174
174
|
|
|
@@ -197,7 +197,7 @@ USER app
|
|
|
197
197
|
|
|
198
198
|
# Backend-specific healthcheck: probes the service over HTTP (port and path from container env, see the Bun stage)
|
|
199
199
|
HEALTHCHECK {hc_flags} \
|
|
200
|
-
CMD node -e "fetch('http://127.0.0.1:'+process.env.PORT+(process.env.
|
|
200
|
+
CMD node -e "fetch('http://127.0.0.1:'+process.env.PORT+(process.env.FLISK_HEALTH_PATH||'/health')).then(r=>process.exit(r.ok?0:1),()=>process.exit(1))" || exit 1
|
|
201
201
|
|
|
202
202
|
WORKDIR /app
|
|
203
203
|
|
|
@@ -31,17 +31,17 @@ load("../constants.star", "PlatformDockerConstants")
|
|
|
31
31
|
load("../config/healthcheck.star", "DOCKER_HEALTHCHECK", "compose_healthcheck_timing")
|
|
32
32
|
|
|
33
33
|
# Load project name for dynamic host naming
|
|
34
|
-
# Use
|
|
34
|
+
# Use FLISK_PROJECT_ROOT env var set by Tilt, fallback to current directory
|
|
35
35
|
def _load_project_name():
|
|
36
|
-
project_root = os.environ.get('
|
|
37
|
-
project_json_path = '.
|
|
36
|
+
project_root = os.environ.get('FLISK_PROJECT_ROOT', '')
|
|
37
|
+
project_json_path = '.flisk/project.json'
|
|
38
38
|
if project_root:
|
|
39
39
|
project_json_path = project_root + '/' + project_json_path
|
|
40
40
|
|
|
41
41
|
if os.path.exists(project_json_path):
|
|
42
42
|
_project_json = read_json(project_json_path)
|
|
43
|
-
return _project_json.get('project', {}).get('name', '
|
|
44
|
-
return '
|
|
43
|
+
return _project_json.get('project', {}).get('name', 'flisk-project')
|
|
44
|
+
return 'flisk-project'
|
|
45
45
|
|
|
46
46
|
_PROJECT_NAME = _load_project_name()
|
|
47
47
|
|
|
@@ -201,7 +201,7 @@ def _generate_single_backend_entry(resource_path, resource_name, res, manifest,
|
|
|
201
201
|
auth_config = AuthConfig.from_manifest(manifest)
|
|
202
202
|
|
|
203
203
|
auth_env = AuthConfig.generate_docker_compose_auth_env(auth_config)
|
|
204
|
-
# secrets.required / secrets.optional, read from the project .env by Compose (empty with
|
|
204
|
+
# secrets.required / secrets.optional, read from the project .env by Compose (empty with FLISK_SECRET_PROVIDER=infisical)
|
|
205
205
|
secrets_env = get_secret_environment_lines(manifest, res_name)
|
|
206
206
|
|
|
207
207
|
byo_image = reject_unsafe_value(manifest.get('image'), 'image') if manifest else None
|
|
@@ -272,7 +272,7 @@ def _generate_single_backend_entry(resource_path, resource_name, res, manifest,
|
|
|
272
272
|
# No HTTP server means no HTTP probe. Disable explicitly: the image HEALTHCHECK would otherwise probe a port nothing listens on.
|
|
273
273
|
no_http_healthcheck_section = NO_HTTP_HEALTHCHECK if (is_worker or health_path == None) else ""
|
|
274
274
|
# Backends with a health path get it in the env, so the shared golden image's HEALTHCHECK can probe it.
|
|
275
|
-
health_env = " -
|
|
275
|
+
health_env = " - FLISK_HEALTH_PATH={}\n".format(health_path) if health_path else ""
|
|
276
276
|
# An agent with files durability keeps its session checkpoints in a named volume. The volume is declared at the top of the
|
|
277
277
|
# generated file (generate_app_compose_from_entries reads the marker line below), so flisk down keeps it.
|
|
278
278
|
agent_env = ""
|
|
@@ -282,8 +282,8 @@ def _generate_single_backend_entry(resource_path, resource_name, res, manifest,
|
|
|
282
282
|
agent_env = " - AGENT_DURABILITY={}\n".format(agent_durability)
|
|
283
283
|
if agent_durability == 'files':
|
|
284
284
|
agent_volume = res_name + '-agent-state'
|
|
285
|
-
agent_env += " - AGENT_STATE_DIR=/var/lib/
|
|
286
|
-
agent_volume_section = " #
|
|
285
|
+
agent_env += " - AGENT_STATE_DIR=/var/lib/flisk-agent\n"
|
|
286
|
+
agent_volume_section = " # flisk-agent-volume: {vol}\n volumes:\n - {vol}:/var/lib/flisk-agent\n".format(vol=agent_volume)
|
|
287
287
|
|
|
288
288
|
if is_worker or is_proxy_disabled_byo:
|
|
289
289
|
traefik_labels = ' - "traefik.enable=false"'
|
|
@@ -526,12 +526,12 @@ services:
|
|
|
526
526
|
""".format(port_anchors=port_anchors)
|
|
527
527
|
|
|
528
528
|
# Named volumes used by services (agent session state) must be declared at the top level. Services mark them with a
|
|
529
|
-
# "#
|
|
529
|
+
# "# flisk-agent-volume: <name>" line, so the declaration follows the services without a separate registry.
|
|
530
530
|
volume_names = []
|
|
531
531
|
for entry in resource_entries:
|
|
532
532
|
for line in entry.split("\n"):
|
|
533
|
-
if line.strip().startswith("#
|
|
534
|
-
name = line.strip()[len("#
|
|
533
|
+
if line.strip().startswith("# flisk-agent-volume: "):
|
|
534
|
+
name = line.strip()[len("# flisk-agent-volume: "):]
|
|
535
535
|
# Replicas of one agent repeat the marker; Compose rejects a duplicate key under volumes:.
|
|
536
536
|
if name not in volume_names:
|
|
537
537
|
volume_names.append(name)
|
package/{engine → runtime/engine}/topologies/platform/docker/compose/traefik_standalone.star
RENAMED
|
@@ -80,12 +80,13 @@ volumes:
|
|
|
80
80
|
name=name,
|
|
81
81
|
gateway_container=PlatformDockerConstants.TRAEFIK_WAKE_GATEWAY_CONTAINER,
|
|
82
82
|
gateway_port=PlatformDockerConstants.TRAEFIK_WAKE_GATEWAY_PORT,
|
|
83
|
-
vendored_gateway_dir="
|
|
83
|
+
vendored_gateway_dir="flisk-cli-ext/engine/assets/docker/wake-gateway",
|
|
84
84
|
tilt_dev_dir=os.environ.get("HOME", "") + "/.tilt-dev",
|
|
85
85
|
project_root_mount=_project_root_mount(),
|
|
86
|
+
docker_socket_gid=_docker_socket_gid(),
|
|
86
87
|
) if sablier_enabled else "",
|
|
87
88
|
dynamic_dir_name=PlatformDockerConstants.TRAEFIK_DYNAMIC_DIR_REL.split("/")[-1],
|
|
88
|
-
vendored_gateway_dir="
|
|
89
|
+
vendored_gateway_dir="flisk-cli-ext/engine/assets/docker/wake-gateway",
|
|
89
90
|
gateway_container=PlatformDockerConstants.TRAEFIK_WAKE_GATEWAY_CONTAINER,
|
|
90
91
|
gateway_port=PlatformDockerConstants.TRAEFIK_WAKE_GATEWAY_PORT,
|
|
91
92
|
tilt_dev_dir=os.environ.get("HOME", "") + "/.tilt-dev",
|
|
@@ -95,6 +96,16 @@ volumes:
|
|
|
95
96
|
)
|
|
96
97
|
|
|
97
98
|
|
|
99
|
+
def _docker_socket_gid():
|
|
100
|
+
"""Group ID the wake gateway joins to reach /var/run/docker.sock.
|
|
101
|
+
|
|
102
|
+
Docker Desktop exposes the socket as root:root (gid 0). On Linux hosts it
|
|
103
|
+
is usually root:docker, whose gid varies, so set FLISK_DOCKER_SOCKET_GID to
|
|
104
|
+
the socket's gid there (`stat -c %g /var/run/docker.sock`).
|
|
105
|
+
"""
|
|
106
|
+
return os.environ.get("FLISK_DOCKER_SOCKET_GID", "0")
|
|
107
|
+
|
|
108
|
+
|
|
98
109
|
def _project_root_mount():
|
|
99
110
|
"""Read-only mount of the project at its own absolute host path.
|
|
100
111
|
|
|
@@ -102,7 +113,7 @@ def _project_root_mount():
|
|
|
102
113
|
itself (bypassing Tilt's build queue), using the compose files Tilt uses.
|
|
103
114
|
Compose resolves relative paths in them (env_file etc.) client-side, so
|
|
104
115
|
they must exist at the same absolute paths inside the gateway container.
|
|
105
|
-
Empty when
|
|
116
|
+
Empty when FLISK_PROJECT_ROOT is unset (the generated Tiltfile sets it).
|
|
106
117
|
"""
|
|
107
118
|
root = project_root_abspath()
|
|
108
119
|
if not root:
|
|
@@ -111,8 +122,8 @@ def _project_root_mount():
|
|
|
111
122
|
|
|
112
123
|
|
|
113
124
|
def project_root_abspath():
|
|
114
|
-
"""Absolute, normalized project root (
|
|
115
|
-
return normalize_abs_path(os.environ.get("
|
|
125
|
+
"""Absolute, normalized project root (FLISK_PROJECT_ROOT), or "" when unset."""
|
|
126
|
+
return normalize_abs_path(os.environ.get("FLISK_PROJECT_ROOT", ""))
|
|
116
127
|
|
|
117
128
|
|
|
118
129
|
_SABLIER_DEPENDS_ON = """ depends_on:
|
|
@@ -162,9 +173,13 @@ _SABLIER_SERVICES = """ sablier:
|
|
|
162
173
|
- TILT_PORT=10350
|
|
163
174
|
- SABLIER_URL=http://sablier:10000
|
|
164
175
|
- PORT={gateway_port}
|
|
176
|
+
# Non-root (see the Dockerfile): the Docker socket is root-owned, so the
|
|
177
|
+
# gateway joins the socket's group instead of running as root.
|
|
178
|
+
group_add:
|
|
179
|
+
- "{docker_socket_gid}"
|
|
165
180
|
volumes:
|
|
166
181
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
167
|
-
- {tilt_dev_dir}:/
|
|
182
|
+
- {tilt_dev_dir}:/home/bun/.tilt-dev:ro{project_root_mount}
|
|
168
183
|
networks:
|
|
169
184
|
- traefik-public
|
|
170
185
|
|