PHPackages                             brainsum/c2bdistro-project - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. brainsum/c2bdistro-project

ActiveProject

brainsum/c2bdistro-project
==========================

Template for creating c2bdistro project via composer.

1.0.x-dev(3w ago)016↓100%GPL-2.0-or-laterPHPPHP &gt;=8.3

Since Apr 7Pushed 3w ago4 watchersCompare

[ Source](https://github.com/brainsum/c2bdistro_project)[ Packagist](https://packagist.org/packages/brainsum/c2bdistro-project)[ RSS](/packages/brainsum-c2bdistro-project/feed)WikiDiscussions 1.0.x Synced today

READMEChangelogDependencies (2)Versions (3)Used By (0)

c2bdistro - Composer template
=============================

[](#c2bdistro---composer-template)

Composer template to kickstart C2 projects.

This template was based on the following:

- [Drupal composer project](https://github.com/drupal-composer/drupal-project)
- [Drupal recommended project](https://www.drupal.org/docs/develop/using-composer/starting-a-site-using-drupal-composer-project-templates)
- [Thunder distro](https://github.com/thunder/thunder-project).

Installation
------------

[](#installation)

Note: These commands have been tested on linux (ubuntu), they might need changes to work on other systems. Note: In the host needs to be composer and min requirement for docker-compose version is 1.27.4.

### Native composer

[](#native-composer)

For the latest release:

```
composer create-project brainsum/c2bdistro-project my-c2bdistro-project
```

For a dev release:

```
composer create-project brainsum/c2bdistro-project --stability=dev my-c2bdistro-project
```

Setup
-----

[](#setup)

### App

[](#app)

Drupal itself is in the `app` folder, you need to use `composer install` there, too. Note, when using the supplied docker stack, on `app` is mounted in the container.

### Environment variables

[](#environment-variables)

By default, the project depends on some environment variables. See the [settings.php scaffold file](./composer/c2bdistro/assets/default.settings.php) as well the files in the [settings folder](./settings).

### (Optional) Docker-compose

[](#optional-docker-compose)

If you want to use docker-compose for development, you should copy `example.env` as `.env`, e.g `cp example.env .env`. Update its contents as required.

For starting and stopping the environment you can use the helper scripts provided with the project (`startup.sh` and `shutdown.sh`). These also look for a `docker-compose.local.yml` file so you can version control a generic config file and do local overrides (e.g ports, mounts).

### Drush

[](#drush)

To be able to make a db backup: Copy `app/drush/local/example.drush.yml` as `app/drush/local/drush.yml`. Update its contents as required.

### Filesystem permission fixes

[](#filesystem-permission-fixes)

E.g. on linux, you must fix file and directory permissions as well, e.g for "private\_files", "web/sites/default/files", "tmp", ...

### Install

[](#install)

Use `drush site-install --account-pass=somestrongpass --site-mail=mail@currentsite.com --site-name=c2bdistro c2bdistro -y`

You also might want to add `--account-name` and `--account-mail`.

Usage
-----

[](#usage)

### Main site

[](#main-site)

Upload your assets and that's it. You can download them, images can be styled for social media purposes, logo can be added, etc.

### API

[](#api)

The JSON:API module has been enabled, so you can serve your assets through that. An example would be using the [FileField Sources JSON API ](https://www.drupal.org/project/filefield_sources_jsonapi) module that allows you to configure file fields to allow downloading files from c2bdistro directly via the API.

Development
-----------

[](#development)

For development info see the [DEVELOPMENT.md](./DEVELOPMENT.md) file.

### Local settings

[](#local-settings)

Create the `app/web/sites/default/settings.local.php` file with the following content:

```
