civibuild¶
Overview¶
civibuild
creates a CiviCRM installation. This involves several subtasks, such as:
- Downloading a CMS (Backdrop, Drupal, Joomla, WordPress).
- Downloading CiviCRM.
- Creating MySQL databases.
- Configuring file permissions on data folders.
- Configuring tests to connect to CiviCRM.
The typical starting point is civibuild create
, which accepts this signature:
civibuild create NAME [--type TYPE] [--url URL] [--civi-ver VERSION] ...
Here is a minimal example:
civibuild create master
Based on the build-name (master
), civibuild
infers default values for
--type
, --url
, and all the other options. It prints a build-log and
ultimately summarizes the outcome:
[[Show site summary (master/default)]]
- CMS_ROOT: /Users/myuser/buildkit/build/master/web
- CMS_URL: http://master.local.civi.bid:8001
- CMS_DB_DSN: mysql://mastercms_17djk:XXXXXXXXXXXX@127.0.0.1:3307/mastercms_68tee?new_link=true
- CIVI_DB_DSN: mysql://masterciv_l8i0k:XXXXXXXXXXXX@127.0.0.1:3307/mastercivi_1qfog?new_link=true
- TEST_DB_DSN: mysql://mastertes_ipc76:XXXXXXXXXXXX@127.0.0.1:3307/mastertest_yfw2r?new_link=true
- ADMIN_USER: admin
- ADMIN_PASS: r4nD0m
- DEMO_USER: demo
- DEMO_PASS: demo
For development work, one often targets a specific configuration. In this next example, we define the options more precisely:
civibuild create mybuild \
--type 'drupal10-clean' \
--url 'http://mybuild.example.org' \
--civi-ver '6.4' \
--admin-pass 's3cr3t'
Again, it prints a build-log and ultimately summarizes the outcome:
[[Show site summary (mybuild/default)]]
- CMS_ROOT: /Users/myuser/buildkit/build/mybuild/web
- CMS_URL: http://mybuild.example.org
- CMS_DB_DSN: mysql://mybuildcms_17djk:XXXXXXXXXXXX@127.0.0.1:3307/mybuildcms_68tee?new_link=true
- CIVI_DB_DSN: mysql://mybuildciv_l8i0k:XXXXXXXXXXXX@127.0.0.1:3307/mybuildcivi_1qfog?new_link=true
- TEST_DB_DSN: mysql://mybuildtes_ipc76:XXXXXXXXXXXX@127.0.0.1:3307/mybuildtest_yfw2r?new_link=true
- ADMIN_USER: admin
- ADMIN_PASS: s3cr3t
- DEMO_USER: demo
- DEMO_PASS: demo
(For more guidance on how to use these options, see civibuild: Options.)
Once you've created a build, there are more subcommands to help manage it over time, such as:
Subcommand | Description |
---|---|
civibuild list |
Browse the list of builds |
civibuild show <NAME> |
Show details about a specific build |
civibuild snapshot <NAME> ,civibuild restore <NAME> |
Save and restore the SQL snapshot(s) |
civibuild reinstall <NAME> |
Re-run the installation process. Re-create the database and config files. |
civibuild destroy <NAME> |
Destroy the database, configuration, and code. |
The other pages in this chapter provide more detailed guidance for how to use civibuild
.
More information¶
- Options: Learn how to customize each build.
- Maintenance: Perform updates on your existing build.
- Settings: Store persistent settings that apply to all builds.
- Development: Details about how to modify
civibuild
itself