For developers
Adding a new project
8 min
only users with lead developer role have permissions to complete this guide prepare the project codebase configure the hosty yaml file following instructions from the project configuration docid\ lkb3t2ovil49dtus 7u1v documentation page make sure the project codebase is ready for deployment usually, it involves installing project dependencies (i e composer install or npm install ) delete unnecessary files and folders from the project's codebase (i e user generated content, local cache files, etc) otherwise, they will be added to the resulting docker images, making it heavier and negatively impacting overall deployment time upload the project backups to the hosting the new project will be spun up from the uploaded database and file backups uploading database backup the backup must be gzipped before uploading the command to upload a database backup is hosty backup\ database\ upload full /backup gz v where backup gz is the arbitrary name of your backup uploading files (assets) backup upload user generated files to the hosting by using the following command hosty backup\ files\ upload \<storagename> \<sourcepathrelativetotheprojectroot> replace \<storagename> with the name of the persistent storage from the hosty yaml config file for example, in e g public repeat this step for every persistent storage configured for example hosty backup\ files\ upload public /drupal/web/sites/default/files v build and deploy production environment before running the build command, make sure that all changes in git for the project are committed hosty cli uses a git hash to determine whether there have been changes made between builds, therefore building with uncommitted changes may lead to unexpected behavior to build the docker image with the code and create a new environment, run the following command this may take a couple of minutes, depending on the code and backups size hosty build push production v hosty deploy production v where "production" is the reserved environment name of the main project environment treated as production all other environment names can be arbitrary and treated as development environments by hosty (no autoscaling, no replication, no failover, etc) we recommend matching git branch names to the environment names for more transparent reference between the code repository and the hosting environments, but it's not required open and check the deployed environment to access the deployment environment, run the following command hosty domains production v it will print public domains assigned to the deployed environment create the first project backup if the project is works as expected, create the project backup it is needed to generate database backup with partial data used to create development environments otherwise, development environments will fail to create until the first backup is taken automatically on schedule (3 times a day) hosty backup\ create v