Makefile provides commands for managing multiple container provisioning.
Note: Pass DOCKER_USER=<user>
to set the user for run commands. Default www-data
.
make <command> <VERSION=4.0 PHP=8.1 DOCKER_USER=www-data ... >
Default values:
- DOCKER_USER=www-data
- PHP=8.1
- VERSION=4.0
- TARGET=dev
- HOSTNAME=localhost
- HOSTNAME_PATH=/
- PROTOCOL=http
💡 It requires a Chevereto license key.
- To build a new production instance:
Note: This command will destroy any previous
prod
instance (including its volumes).
make prod
💡 It requires a Chevereto license key.
- To build a new demo instance:
Note: This command will destroy any previous
demo
instance (including its volumes).
make demo
A dev instance is used when you have a Chevereto project in your system (SOURCE
argument). A Chevereto project is any folder containing Chevereto code, including your own modified versions.
💡 It requires a Chevereto project.
- To build a new dev instance:
Note: This command will destroy any previous
dev
instance (including its volumes).
make dev SOURCE=~/git/chevereto/v4
- To implement demo on dev:
make dev--demo
- To run composer
update
on dev:
make dev--composer run=update
- To run composer
install
on dev:
make dev--composer run=install
- To run
sync
script on dev instance:
💡 It syncs your SOURCE
with the code running in the container.
make dev--sh run=sync
- To run
observe
script on dev instance:
💡 Same as sync, but observe SOURCE
for auto re-sync.
make dev--sh run=observe
Note: These commands only interact with the docker compose
yml files. Any extra requirement (as sync, dependencies, etc.) is not provided.
Available options:
- TARGET=dev (dev, demo, prod)
- To up an instance:
make compose-up
- To up an instance (daemon):
make compose-up-d
- To takedown an instance (keep volumes):
make compose-down
- To takedown an instance (remove volumes):
make compose-down--volumes
To retrieve and follow the error log:
make log-error
To retrieve and follow the access log:
make log-access
To enter a container's bash shell:
make bash
To build a container image:
make build
To build your custom httpd.conf, edit the contents of chevereto.conf and run:
make build-httpd
Problem: If you get the following loop:
[* starting] Waiting for chevereto4.0-prod-php8.1...
[* unhealthy] Waiting for chevereto4.0-prod-php8.1...
[* starting] Waiting for chevereto4.0-prod-php8.1...
.
.
.
Possible cause: Wrong license key provided.
Workaround: Make sure to use cmd + v
when using macOS, and shift + ctrl + v
if using Linux to paste the license key.
Problem: Wrong Docker engine/compose versions.
Workaround: Check if you are running latest Docker version with Compose V2 docker compose
(not docker-compose
).
If Docker was included with your Linux distribution check for Install Docker Engine on Linux. Some distributions may be providing old docker engine for LTS compliance, make sure to follow Docker instructions.