feat: add cache-rt command and SYNC_CACHED_RT env variable for resource types (#7666)
* feat: add cache-rt command and SYNC_CACHED_RT env variable for resource types Add a new CLI command `cache-rt` that fetches resource types from the hub and caches them locally. This command is run during Docker image build to pre-populate the cache. Add `SYNC_CACHED_RT` environment variable that, when set to true, syncs cached resource types to the admins workspace's resource_type table on server startup. The sync is incremental - it only updates resource types that have changed. Changes: - Add HUB_RT_CACHE_DIR constant for resource type cache location - Add cache-rt CLI command to fetch and cache resource types from hub - Add sync_cached_resource_types() to sync cached types to database - Update all Dockerfiles to run cache-rt during image build Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: parse schema string from hub into proper JSONB The hub API returns schema as a JSON string that needs to be parsed into a proper JSON value before inserting into the database. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -254,7 +254,7 @@ COPY ./frontend/src/lib/hubPaths.json ${APP}/hubPaths.json
|
||||
|
||||
RUN windmill cache ${APP}/hubPaths.json && rm ${APP}/hubPaths.json
|
||||
|
||||
|
||||
RUN windmill cache-rt
|
||||
|
||||
# Create a non-root user 'windmill' with UID and GID 1000
|
||||
RUN addgroup --gid 1000 windmill && \
|
||||
|
||||
Reference in New Issue
Block a user