diff --git a/README.rst b/README.rst index 9961533..8a780f7 100644 --- a/README.rst +++ b/README.rst @@ -263,19 +263,19 @@ Syncano Hosting Syncano Hosting is a simple way to host your static files on Syncano servers. The CLI supports it in the following way: -This command will list files for currently hosted website:: +This command will list currently defined hostings in the instance:: syncano hosting list +This command will list files for currently hosted website (for `default` hosting):: + + syncano hosting list files + This command will publish all files inside ** to the default Syncano Hosting instance. When publishing the whole directory, the structure will be mapped on Syncano.:: syncano hosting publish -This command will unpublish currently published hosting:: - - syncano hosting unpublish - This command will permamently delete the hosting:: @@ -289,6 +289,14 @@ This command will update single file:: syncano hosting update hosting/file/path local/file/path +For each of the above command you can specify the domain to change just after hosting command, example:: + + syncano hosting --domain staging publish + +Will create a new hosting which will be available under: `--staging.syncano.site` +If this hosting is also a default one, it will be available under: `.syncano.site`. + + Custom Sockets ============== diff --git a/syncano_cli/hosting/command.py b/syncano_cli/hosting/command.py index e81aff5..c15cbdc 100644 --- a/syncano_cli/hosting/command.py +++ b/syncano_cli/hosting/command.py @@ -4,18 +4,31 @@ import click from syncano_cli.base.command import BaseInstanceCommand -from syncano_cli.hosting.exceptions import NoDefaultHostingFoundException, PathNotFoundException, UnicodeInPathException +from syncano_cli.hosting.exceptions import NoHostingFoundException, PathNotFoundException, UnicodeInPathException class HostingCommands(BaseInstanceCommand): VALID_PATH_REGEX = re.compile(r'^(?!/)([a-zA-Z0-9\-\._]+/{0,1})+(?