Connect a Git repository
Take a connected repository to its first live release: add the project file, link your checkout, launch and load your data.
On this page
Tilizy builds your website from the Git repository that holds its code. Your code stays in your repository: Tilizy reads it from there, and from then on a push or a release tag deploys it. This page takes a repository from "connected" to a first live release.
Before you start
- Your website is added in the portal and has a hosting plan. See Add a project.
- The repository is connected to your website in the portal.
- The Tilizy CLI is installed and you are signed in. See Install the CLI.
- You have a local checkout of the repository, with a remote called
origin.
Steps
-
Create the project file. In the root of your checkout, run:
tilizy app:initThe command inspects the checkout and writes
.tilizy/app.yaml, and.tilizy/services.yamlwhen it detects a database. It prints the framework, the PHP version and the web root it found. It refuses to overwrite an existing file unless you pass--force. Everything it writes is yours to edit: add your build steps and scheduled jobs as described in The project file. -
Check it.
tilizy app:validateThis reads the files the same way a deploy does and prints what it understood, or an error that names the file and the key. It also points out problems that would stop a first launch, such as a Drupal deploy step that imports configuration when no configuration export is committed.
-
Commit and push the
.tilizy/folder with your usual Git commands. -
Check that the CLI recognises the checkout.
tilizy project:listThe list shows every project you can open, and marks the ones that are checked out on this computer. If your checkout is not matched to its project, bind it once. The command reads the address of
originand stores it on the project:tilizy project:link <project> -
Launch the live environment.
tilizy app:launchThe command checks that the project is ready and lists anything that is missing. It creates a value for every secret your project file declares and the portal does not hold yet. Then it creates the live environment behind a preview address that only your team can open, and follows the job to the end. The live environment follows the branch
mainunless you pass--branch. -
Load your data. A new environment has an empty database, so it waits for data before it builds and starts the website. Load a database dump (
.sqlor.sql.gz), then deploy:tilizy db:load --prod dump.sqltilizy app:deployUploaded files, such as images, go into the persistent folders with
tilizy files:upload. See Database and files. -
Add your domain. The preview address keeps working until your domain points to Tilizy. See Domains and certificates.
After the first launch
You do not launch again. Each environment has its own rule for what starts a deploy: every push to a branch, a release tag, or only when you ask. See Deploys and releases.
Note: Do not assume a push does nothing. An environment that follows a branch deploys every push to that branch.
What can go wrong
- The CLI cannot find the project. It matches the address of
originto a project and never guesses.app:launchandapp:createread the project file from the checkout, so they must run inside the checkout of that project. Naming another project with-pdoes not change that. - The launch succeeds but the website does not answer. The database is empty. Load a dump, then run
tilizy app:deploy. app:launchis refused. The project already has a live environment. Usetilizy app:deploy.- The dump is refused. A dump made with personal data replaced, which is what
tilizy db:dumpproduces from a hosted environment by default, cannot be loaded into the live environment. Made-up data must never replace real records.
Next: The project file and Deploys and releases.