-
Notifications
You must be signed in to change notification settings - Fork 44
Initialization
Once you have created a new repository containing the gitpod-laravel-starter
framework then you are ready to initialize it as a Gitpod workspace. We also call this step workspace creation. Gitpod workspaces are ephemeral. An ephemeral workspace simply means that it is intended to be created, worked on, and then discarded. Each time you need to work on your project at a later date you can simply create a new workspace from your repository. Workspaces can also be started and stopped in cases where the data you have put in your system needs to be kept and worked with or you would like to skip the sometimes lengthy initialization step.
The gitpod-laravel-starter
framework primarily consists of a .gitpod.Dockerfile
a starter.ini
configuration file and a series of bash scripts that run in succession.
The following happens each time a workspace is created:
- Code directives are executed from
.gitpod.Dockerfile
. A docker container consisting of multiple images is built and cached.- This process creates an empty Laravel project in a temporary location that the bash scripts use copy over or intelligently merge with any existing Laravel project you may have in your repository.
- When this process is complete an online IDE appears and the next phase happens.
- A log of what happened during this 'workspace image creation' step can be found in
/var/log/workspace-image.log
- The code from
.gitpod.yml
runs which then executes a series of bash scripts that complete the initialization process. The bash scripts run in the same order every time and do the following tasks depending on how you have configured yourstarter.ini
file.-
npm
is updated to version^7
- The project is then bootstrapped by using
rsync
to merge only new files that do not already exist from the empty Laravel project created in the docker container with any existing Laravel project you may already have saved to your repository. Because of this you may need to put a.gitignore
on some files that you may not want in your repository such asresources/js/components/Example.js
for React projects andresources/js/components/ExampleComponent.js
for Vue projects.
-
- In order to make room for your own LICENSE, README.md and CHANGELOG.md files, the following
gitpod-laravel-starter
files are moved from the project root to the.gp
directory:- LICENSE
- README.md
- CHANGELOG.md
- The Laravel readme which is named LARAVEL_README.md
- The initialization then continues with optional installations and configurations as set in your
starter.ini
and depending on what Laravel project files you may have already saved to your repository.
If you would like an even more granular breakdown of what happens during the initialization phase, such as the name of the bash scripts that are executed then please have a look at the source code and the .gp/bash directory therein.