Skip to content
This repository has been archived by the owner on Oct 14, 2024. It is now read-only.

Latest commit

 

History

History
192 lines (121 loc) · 3.59 KB

MAKE.md

File metadata and controls

192 lines (121 loc) · 3.59 KB

Make

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

Production

💡 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

Demo

💡 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

Dev

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

Docker compose commands

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)

Up

  • To up an instance:
make compose-up
  • To up an instance (daemon):
make compose-up-d

Down

  • To takedown an instance (keep volumes):
make compose-down
  • To takedown an instance (remove volumes):
make compose-down--volumes

Logs

To retrieve and follow the error log:

make log-error

To retrieve and follow the access log:

make log-access

Bash

To enter a container's bash shell:

make bash

Build container image

To build a container image:

make build

Build httpd.conf

To build your custom httpd.conf, edit the contents of chevereto.conf and run:

make build-httpd

Troubleshooting

Container never stars

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.

Unable to run containers

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.