# backdrop

Backdrop CMS — a comprehensive CMS for small to medium-sized organisations and
non-profits. A fork of Drupal focused on affordability and stability.

- Upstream: https://backdropcms.org
- Docker image: https://hub.docker.com/_/backdrop

<!-- metadata -->
* **Category**: Apps
* **Status**: 1, work-in-progress
* **Image**: [`backdrop`](https://hub.docker.com/_/backdrop), 4, upstream
* **Healthcheck**: No
* **Backups**: Yes
* **Email**: 2 (via compose.smtp.yml overlay)
* **Tests**: 1
* **SSO**: No
<!-- endmetadata -->

## Basic deployment

```bash
abra app new backdrop --server <your-server> --domain backdrop.example.com
abra app secret generate <app-name> --all
abra app deploy <app-name>
```

Visit `https://backdrop.example.com/core/install.php` to complete installation.

When prompted for database credentials:
- **Database type**: MySQL / MariaDB
- **Database name**: `backdrop`
- **Username**: `backdrop`
- **Password**: *(the generated `db_password` secret)*
- **Host**: `db`

## Email / SMTP

Add the SMTP overlay to send transactional email:

```bash
abra app config <app-name>
# set: COMPOSE_FILE=compose.yml:compose.smtp.yml
# set: SMTP_HOST=<relay-hostname>
# set: SMTP_FROM=noreply@example.com
abra app deploy <app-name>
```

You will also need to configure Backdrop's SMTP settings in the admin UI or via
a module such as [SMTP Authentication Support](https://backdropcms.org/project/smtp).

## Persistent data

The following named volumes persist data across upgrades:

| Volume | Contents |
|---|---|
| `backdrop_files` | User-uploaded files |
| `backdrop_modules` | Contributed modules |
| `backdrop_themes` | Contributed themes |
| `backdrop_layouts` | Layout configurations |
| `mariadb` | Database files |

## Backups

Backups are configured via `backupbot` labels on the `app` service. The
pre-hook dumps the database into the `files` volume before the volume snapshot
is taken, so a single backup contains both files and database.

```bash
# manual backup with abra
abra app backup <app-name>
```

## Upgrading

```bash
abra recipe upgrade backdrop
abra app deploy <app-name> --chaos   # test locally first
abra recipe release backdrop
abra app upgrade <app-name>
```

Check Backdrop's [upgrade guide](https://backdropcms.org/upgrade-instructions)
for any manual database update steps, then run:

```bash
abra app run <app-name> app -- drush updb
# or visit /update.php in the browser
```

## Development / hacking

```bash
abra recipe fetch backdrop --ssh
# edit files in ~/.abra/recipes/backdrop/
abra app deploy <app-name> --chaos
```
