Change or Update a Base Preview

There are a few different ways you can change or update your Base Previews:

Change a Base Preview

If you want to change a Docker image that a Base Preview is using, or make changes to something that happens during the init phase of the Preview build process, you’ll need to Rebuild your Base Preview. Rebuilding a Base Preview kicks off a fresh build process from the beginning, in effect replacing your current Base Preview with a new one that contains all of your changes.

Want to know more about build phases? Check out: the build process: explained.

If you’ve checked the Repository Setting to Rebuild Orphaned Previews Automatically, a successful Rebuild of a Base Preview will kick off Rebuilds of any child Previews that were built from your Base Preview.

To Rebuild a Base Preview:

  1. Go to username -> My Projects at the upper-right of the Tugboat screen.
  2. Select the project where you want to change the Base Preview.
  3. Click the name of the repo that contains Base Preview you want to change.
  4. Click the Actions drop-down menu for the Base Preview, and select Rebuild .
  5. To confirm that you actually want to change the Base Preview, rather than just updating it, click the checkbox next to Yes, rebuild this preview . You may also want to Rebuild previews built from this one when finished .
  6. Press the Rebuild button.
Visual Walkthrough

Update a Base Preview

If you don’t need to pull a new Docker image or make changes to the init phase in your config file, you can do a smaller, faster update of your Base Preview using Refresh. Refreshing a Base Preview:

  1. Pulls the latest code from git.
  2. Runs commands from the update section of the config.yml.
  3. Run commands from the build section of the config.yml.

Want to know more about build phases? Check out: the build process: explained.

If you want to pull a fresh Docker image, or if you’ve made changes to the config.yml’s init phase, you’ll need to rebuild the Base Preview in order to see those changes.

Tugboat provides a couple of ways to Refresh a Base Preview:

If you’ve checked the Repository Setting to Rebuild Stale Previews Automatically, a successful Refresh of a Base Preview will kick off Rebuilds of any child Previews that were built from your Base Preview.

Manually Refresh a Base Preview

To manually kick off a Base Preview update:

  1. Go to username -> My Projects at the upper-right of the Tugboat screen.
  2. Select the project where you want to update the Base Preview.
  3. Click the name of the repo that contains Base Preview you want to update.
  4. Click the Actions drop-down menu for the Base Preview, and select Refresh .
  5. If you want to Rebuild Previews that were built from this Base Preview after the update, click the checkbox next to Rebuild Previews built from this one when finished .
  6. Press the Refresh button.
Visual Walkthrough

Automatically Refresh a Base Preview

You’ll generally want to keep your Base Preview up to date with your latest codebase, and a fresh copy of your database, image files, and other assets. By default, Tugboat automatically checks for updates every night at 12 am UTC, and refreshes your Base Preview with these updates. You can toggle this feature, or change the time and interval at which Tugboat does an automated Refresh of your Base Previews.

To change Tugboat’s settings to automatically Refresh Base Previews:

  1. Go to username -> My Projects at the upper-right of the Tugboat screen.
  2. Select the project where you want to configure auto-update settings for Base Previews.
  3. Click into Settings for the repository.
  4. Go to Refresh Base Previews Automatically . Toggle the checkbox and/or adjust the frequency and timing of these automatic updates.
  5. Press the Save Configuration button to save your changes.
Visual Walkthrough