timeld-gateway v0.2.11
timeld Gateway
The timeld Gateway is a service to manage timeld accounts and persist timesheets safely. It can be deployed and scaled easily on a cloud platform.
Fly.io Deployment Notes
app
Decide your app name.
flyctl apps create timeldIf developing off the main branch, the deploy script (below) will use your current branch name as a suffix; in preparation you should run the above command with the suffixed name e.g. timeld-edge.
volumes
A volume is required for clone persistence (Gateway and Timesheet domains).
NB: The -a parameter must match your app name.
flyctl volumes create timeld_data --region lhr -a timeldNB: "A volume is directly associated with only one app and exists in only one region."
Each instance of an app must have dedicated storage. So we can either:
- set
fly scale ... --max-per-region=1(limits scaling), or- create a directory under
/dataper allocation ID – (creates a garbage collection problem with rolling redeploy)
secrets
flyctl secrets import < .env -a timeldWhere the .env file contains:
TIMELD_GATEWAY_ABLY__KEY={your root ably key}TIMELD_GATEWAY_ABLY__API_KEY={your ably control API key}TIMELD_GATEWAY_COURIER__AUTHORIZATION_TOKEN={your courier auth token}TIMELD_GATEWAY_COURIER__ACTIVATION_TEMPLATE={courier activation email template ID}
deploy
NB: If you have made any changes to timeld-common, it needs to be published first.
A script is provided to generate, and optionally run, the correct deploy command.
chmod +x deploy.sh
./deploy.shdeploy.sh takes three optional arguments:
1. app name (root); defaults to timeld
2. app name suffix; defaults to git branch name e.g. timeld-edge. If main, no suffix is used, i.e. just timeld.
3. genesis (if used, the 1st two arguments must also be given)
The first deployment of a new Gateway must be started with the genesis flag.
random
engines.nodeis set to 16.x inpackage.jsondue to a bug in Restify.simple-peeris a dependency even if we don't use WebRTC (a bug in m-ld-js/ext/ably).
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago