docs.coopcloud.tech/docs/recipe-structure.md

2.5 KiB

title
Recipe structure

A recipe is a git repository that contains instructions for creating stacks that abra can read and interpret. You'll see a couple of files there:

compose.yml

this is a compose specification compliant file that contains a list of:

  • services
  • secrets
  • networks
  • volumes
  • configs

that describe what is needed to run a stack. Whenever you deploy an app, abra reads this file to cook the stack.

.env.sample

this file is a skeleton for environmental variables that should be adjusted by the user. Examples include: domain or php extention list. Whenever you create a new app with abra app new this file gets copied to the ~/.abra/servers/server-domain/app-name.env and when you run abra app config you're editing this file.

abra.sh

abra.sh provides shell functions for running non-standard deploy, restore, rollback, backup and upgrade. This is only needed for some packages (such as nextcloud or wordpress)

entrypoint.sh

after docker creates the filesystem and copies files into a new container it runs what's called an entrypoint. This is usually a shell script that exports some variables and runs the application. Sometimes the vendor entrypoint doesn't do everything that we need it to do. In that case you can write your own entrypoint, do whatever you need to do and then run the vendor entrypoint. For a simple example check entrypoint.sh for croc. In this case, croc needs the password to be exported as an environmental variable called CROC_PASS, and that is exactly what the entrypoint does before running vendor entrypoint. If you write your own entrypoint, it needs to be specified in the config section of compose.yml.

other compose files

i.e. compose.smtp.yml. These are used to provide non-essential functionality such as (registration) e-mails or single sign on.

other files

if you look at compose.yml (or compose.*.yml) and see a configs section, that means this compose file is putting files in the container. This might be used for changing default (vendor) configuration, such as this fpm-tune.ini file used to adjust php-fpm.