apolopena / gitpod-laravel-starter

Configurable LAMP or LEMP stack starter project powered by Laravel and Gitpod. Supports Laravel 6, 7, and 8. Out of the box support for React, Vue, and Bootstrap frontends, with or without built-in auth .
https://github.com/apolopena/gitpod-laravel-starter/wiki
MIT License
40 stars 44 forks source link

phpmyadmin install configuration only works the very first time #28

Closed apolopena closed 3 years ago

apolopena commented 3 years ago

Describe the bug

The very first time the workspace is built and the workspace image is craeted then whatever value is set for the install for phpmyadmin in starter.ini will be respected. However on subsequent creations of the gitpod workspace this phpmyadmin install value will only be respected if the workspace image is rebuilt. The workspace image is cached and will only rebuild if there is a significant change to the .gitpod.Docker file.

Screenshots

Steps to reproduce

  1. Set the install value for phpmyadmin in starter.ini to 1. Push that change to your repository.
  2. Create a Gitpod workspace from your repository for the very first time.
  1. Set the install value for phpmyadmin in starter.ini to 0. Push that change to your repository.
  2. Create another Gitpod workspace from your repository.

Expected behavior

When the install value for phpmyadmin in starter.ini is set to 0 and the a new Gitpod workspace is created then phpmyadmin should not be installed.

Workaround

You can workaround this issue by incrementing the value of ENV INVALIDATE_CACHE in .gitpod.Dockerfile. This will force the build of a new workspace image.

apolopena commented 3 years ago

Use the workaround when creating multiple new workspaces and chaning the phpmyadmin install directive in between. This is result of the docker caching mechanism within the gitpod system. Workspaces are cached, so unless a workspace image is forced to be rebuilt then there is guarantee that phpmyadmin will be installed or not.

It appears that when a workspace is created in gitpod from a repo for the very first time, the workspace image is built, not cached.

Regardless if you are creating new workspaces and changing the phpmyadmin install directive in starter.ini, in between creation of these workspaces then you will need to increment the value of ENV INVALIDATE_CACHE in .gitpod.Dockerfile and save it to the repository before you create the workspace to ensure that you get your desired results.

apolopena commented 3 years ago

Workaround no longer needed. Fixed in https://github.com/apolopena/gitpod-laravel8-starter/issues/28