Deployment URLs
Every application gets a production URL, one URL per branch, and a permanent URL per deployment.
Gigadrive Network generates three kinds of URL for an application, all of them under gigadrive.app. Two move as you deploy, and one is pinned to a single deployment forever.
The three URLs
| Kind | Format | Points at |
|---|---|---|
| Production | my-app.gigadrive.app | The newest active deployment in the production environment |
| Branch | my-app-git-feature-login.gigadrive.app | The newest deployment of that branch |
| Deployment | my-app-abc12345.gigadrive.app | One deployment, permanently |
my-app is the application's label. It is assigned from the application slug on the first deployment, and you can change it afterwards.
The branch URL appears the first time you deploy a branch and re-points on every later deployment of it. Branches covers how a branch maps to deployments. The production URL re-points when a deployment to the production environment goes live, which is what makes a rollback take effect at the address your users already have, and Environments covers how an application's environments are arranged.
The per-deployment URL never moves. Its suffix is an eight-character id of lowercase letters and digits, and it stays bound to that one deployment long after production has moved past it. That is the URL to paste into a pull request or a bug report. Very old deployments that stopped receiving traffic eventually lose their static assets to retention, though their Functions keep responding; Deployment retention covers when that happens.
Choose your production label
Open the application's domain settings
In the console, open the application, then Settings, then Domains. The Production hostname card holds the label and shows the
.gigadrive.appsuffix beside it.Enter a label
Availability is checked as you type. Every hostname is unique across the whole platform, so a label another organization already holds is unavailable to you.
Save
Whatever you type is normalized server-side, soMy Appis saved asmy-app.
If the application has no active production deployment, the label is reserved rather than live and the URL starts serving after your next production deployment.
Renaming carries the branch URLs with it. Set the label to checkout and my-app-git-main.gigadrive.app becomes checkout-git-main.gigadrive.app in the same operation. The old hostnames are released the moment you save, so anything still pointing at them stops resolving, and another application can take the name.
Label rules
| Rule | Value |
|---|---|
| Length | 3 to 63 characters after normalization |
| Characters | Lowercase letters, digits, and hyphens between them |
| Dots | Rejected. A label is one level under gigadrive.app |
-git- | Rejected, because branch URLs are built with it |
| Reserved labels | A fixed list that includes www, api, admin, docs, and status |
| Abusive language | Rejected |
| Uniqueness | Global across the platform |
The dot rule is a consequence of the certificate: *.gigadrive.app covers one level, so api.my-app.gigadrive.app would fail its TLS handshake. SSL certificates covers the rest.
Set the production label from code
There is no CLI command for hostnames. Both API surfaces check availability first, then claim the label.
import { GigadriveClient } from '@gigadrive/sdk';
// Credentials are read from GIGADRIVE_CLIENT_ID and GIGADRIVE_CLIENT_SECRET.
const client = new GigadriveClient();
const applicationId = '0197b2f1-2f4a-7a0b-8a2d-222222222222';
const { available, reason } = await client.applications.checkHostnameAvailability(applicationId, 'my-app');
if (!available) {
throw new Error(`Label unavailable: ${reason ?? 'no reason given'}`);
}
const { hostname, live } = await client.applications.setProductionHostname(applicationId, 'my-app');
console.log(live ? `Live at https://${hostname}` : `Reserved ${hostname}, deploy to production to go live`);