Skip to main content
FreeThree checks for your projectUptime, accessibility, SEO and cookie checks for your project
Menu

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

  1. Create the project file. In the root of your checkout, run:

    tilizy app:init

    The command inspects the checkout and writes .tilizy/app.yaml, and .tilizy/services.yaml when 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.

  2. Check it.

    tilizy app:validate

    This 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.

  3. Commit and push the .tilizy/ folder with your usual Git commands.

  4. Check that the CLI recognises the checkout.

    tilizy project:list

    The 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 origin and stores it on the project:

    tilizy project:link <project>
  5. Launch the live environment.

    tilizy app:launch

    The 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 main unless you pass --branch.

  6. 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 (.sql or .sql.gz), then deploy:

    tilizy db:load --prod dump.sql
    tilizy app:deploy

    Uploaded files, such as images, go into the persistent folders with tilizy files:upload. See Database and files.

  7. 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 origin to a project and never guesses. app:launch and app:create read the project file from the checkout, so they must run inside the checkout of that project. Naming another project with -p does 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:launch is refused. The project already has a live environment. Use tilizy app:deploy.
  • The dump is refused. A dump made with personal data replaced, which is what tilizy db:dump produces 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.