Profiles and Hosts
A profile stores everything rp needs to talk to one Repsy host. Profiles are kept in hosts.yml, keyed by host name; the one used when you name no host is current_host in config.yml (see Configuration).
Manage profiles with rp profile: add, list, use, remove and doctor.
Selecting a host
The host of a command is, in this order:
- the
--hostnameflag, - the
REPSY_HOSTenvironment variable, current_hostinconfig.yml.
If none is set, the command fails and asks you to pass --hostname, set REPSY_HOST or log in first.
A host is a name with an optional scheme and port, such as repsy.io, https://repsy.example.com or 10.0.0.5:8080. It must not contain credentials, a path, a query or a fragment.
Schemes
- A bare host is
https. httpis used only when you writehttp://.httpon a loopback host (localhost, an address in127.0.0.0/8, or::1) is silent.httpon any other host is accepted, with a warning on standard error that credentials and requests are sent in clear text.
Repsy Cloud
The Cloud hosts are known to rp, and their URLs are derived:
| Host | API | Registry (protocols) | Web |
|---|---|---|---|
repsy.io | https://api.repsy.io | https://repo.repsy.io | https://repsy.io |
dev.repsy.io | https://api-dev.repsy.io | https://repo-dev.repsy.io | https://dev.repsy.io |
Cloud serves the panel API and the package protocols on separate hosts, and its protocol URLs may carry an owner segment. --owner sets it; --owner= (empty) means none. rp profile doctor --repo <name> can detect which variant a host uses.
Self-hosted Repsy Open Source
For any other host, rp asks the server which product it runs (one request to its login route, without a credential) and stores the answer in the profile. When the server cannot tell, rp warns and treats the host as Repsy Open Source.
On Repsy Open Source the panel API also serves the panel UI, and the protocols run on the same host on another port. Default ports:
| Scheme | Panel API and UI | Protocols |
|---|---|---|
https | 8443 | 9443 |
http | 8080 | 9090 |
A port you write in the host is the panel port; the protocol port keeps its default. Override any URL with --api-url, --registry-url or --web-url.
Custom domains
A Cloud custom domain is not one of the known hosts, and serves no panel API of its own. Tell rp explicitly:
rp profile add <custom-domain> --type cloud \
--api-url <api-url> --registry-url <registry-url> --web-url <web-url>
For a host forced to Cloud that is not a known one, no URL is derived, so the three URLs must be given. The web URL may stay empty until it is set. --type os|cloud (or REPSY_TYPE) overrides the detection for any host.
Precedence of a field
For each of product, API URL, registry URL, web URL and owner, the first of these wins:
- the command line flag,
- the environment variable,
- the stored profile,
- the value derived from the host.
rp profile add stores the derived values as they are at that moment. Environment variables are not stored.