Git Syncing Resources for VPC Retool Instances

Currently, I have three VMs that are configured, dev, staging, prod.

Commits are added to dev automatically, pulls and merges from dev to staging, and then pulls and merges from staging to prod. All of this works handsomely - no issues.

However - one thing I'm noticing is that my resources aren't getting kicked over in the process. (I.e: aren't flowing to each instance, or even being committed to the dev branch for that matter).

Am I missing something there? Per the docs, it appears that the resource creation should also generate a .yml describing said resource, but it doesn't appear to be happening. I've also looked at the logs and there doesn't appear to be any errors being thrown when new resources are created.

This bits regarding masking secrets for database creds and other bits via RETOOL_EXPOSSED_ makes sense, but sharing the resources across via Git-Sync - as mentioned in the docs, is a bit fuzzy.

As you can see, while live-logging - "no changes found" when adding a resource.

According to the docs, there should also be a config/resources folder inside of the repos that are being created - which, aren't there:Screenshot by Lightshot

Let's say I want to expose all resources that are created and mirror them across each VM once they're pulled + merged - is there an easy way to configure this via the env file? A wild-card - or would I have to make changes to each environment every time I added a new resource?

At any rate, samples on sharing resources between VMs would be fantastic!

Note:

  • Each VM has a different managed Postgres instance attached to it
    • Dev
    • Staging
    • Production
  • Each VM shares the same License Key

I have also shared this with a few of my direct connections at Retool - but I wanted to post here so that I am bringing attention to the issue and to determine a fix as fast as possible.

It only lets me add one link or external resource per post, being a new-bro and all. So, here is a shot of the git-sync working regarding apps - just not resources:

Wanted to make sure that I replied here with a solution that @antonybello provided to share with the community.

Here is a video going through the overview. Key things to remember:

  1. Make sure that all of you instances are sharing the same db encryption key
  • If you're using a managed Postgres data-store, you're probably gonna run into issues, at least I did. I recommend just rec-creating a fresh pg image per the container provided
  1. Make sure that APPS_FS_SYNC_ON=true in your docker.env file (both your dev and master)
  • This will write both your org settings, apps, and resources directly to the file-system.
  1. Make sure your master instance is read only: VERSION_CONTROL_LOCKED=true

Hopefully this helps some folks who run into similar issues in the future.

The documentation on the platform website is a tad out of date.

2 Likes

For anyone finding this thread later, the environment variable is APPS_FS_SYNC_ON (plural) :slight_smile:

2 Likes