const url = `${flyApiHostname}/v1/apps/${flyAppName}/machines`;
const machineConfig = {
config: {
image: currentImage,
size: "shared-cpu-1x",
env: {
DYNAMIC_KEY: dynamicKey,
},
services: [
...
],
metadata: {
fly_platform_version: "v2",
fly_process_group: "app",
user_machine: "true",
user_id: userId,
created_by: "user_machine_script",
created_at: new Date().toISOString(),
},
},
name: `${userId}`,
region: "iad"
};
For sure. It turns out the core problem I was trying to solve for is better solved by the fly replay router.