Project
A project as it relates to mstrap is essentially just a reference to a Git repo that has been configured in a Profile.
Making a project “mstrap-ready”
Technically, there’s nothing special that needs to be done to make a project “mstrap-ready” other than defining it in a profile to be used by mstrap, e.g.
project "my-cool-project" {
name = "My Cool Project"
repo = "ssh://git@github.com:maxfierke/my-cool-project.git"
}
Various basic things will be detected and performed automatically, e.g.:
- Presence of
.ruby-version
,.node-version
,.python-version
, etc. file(s) will cause the respective language runtime version to be installed. - Presence of a
Gemfile
,package.json
,yarn.lock
, etc. will cause the respective package manager to be invoked. - If the project is a web project, an NGINX configuration will be
created for the project. If
mkcert
is installed, it will setup TLS certs for the NGINX site as well.
These conventions are outlined on the Conventions page as well.
For more advanced or other bootstrapping needs not covered by mstrap, you can
provide an executable script/bootstrap
or script/setup
file in the project’s
repo. If the project has a script/bootstrap
and/or script/setup
they will
be run instead of the built-in bootstrapping behavior, unless running the scripts
has been disabled at the project config level (run_scripts = false
).