Installation & Configuration
Table of contents
- Recommended Installation
- General bundle configuration
- Manual Installation
Please see the Components Web App template repository. This includes a complete setup with the front-end application using our own Nuxt module as well. It also includes testing frameworks setup by default so you can start writing tests for your application immediately, a
docker-compose.yaml configuration for local development, a helm chart for Kubernetes and a complete Gitlab dev-ops configuration for a production environment.
You will need to create your JWT keys and setup your security.
General bundle configuration
You can configure the name of the website the API is for which is used in a number of places, such as the default email signatures, and the API Swagger documentation. You can also adjust the default prefix applied to tables in your database. This is to prevent any naming conflicts.
Website name (required)
This is used for a number of default features, including email signatures and adding a default title to your swagger documentation (if you remove the title configuration from the API Platform recipe)
silverback_api_components: website_name: ~ # Required
To prevent table name conflicts, we automatically prefix
_acb_ to the database tables that API Component Bundle manages. You can customise this using this configuration.
silverback_api_components: table_prefix: _acb_
Resources handled by API Components Bundle will include metadata. We inject this into a variable in your output which is
_metadata by default. You can customise this in your configuration.
silverback_api_components: metadata_key: _metadata
We encourage using as many of the packages as possible that are well maintained by large and active communities. Therefore, let’s start with the most up to date API Platform files and then install this bundle on top.
In the future, we will be creating a standard package you will be able to use for installing ACB instead of needing to follow these instructions. For now, we want to just focus on getting this bundle working well without the additional repository to maintain.
- Download API Platform files from GitHub as described in their ‘Getting Started’ instructions
- Delete the folders
/admin- we do not need these
- Remove the client and admin configurations from the
- Update the
- Change PHP version to at least 7.4
COPY assets assets/beneath
COPY src src/
docker-php-ext-installarguments (exif is to determine whether files are images and xsl is for the Inky extension working with emails using Symfony Mailer)
apk add --no-cache --virtual .build-deps(required to install xsl)
- Add to
apk add --no-cache --virtual .build-depscommand the packages
- Add the following to include gd
docker-php-ext-configure gd --with-freetype --with-jpeg
- Add or modify to include gd
- Add to
- Start up the containers
docker-compose exec php shto bash into the php container
Install Api Components Bundle
composer require silverbackis/api-components-bundle:dev-master
Be sure to run the recipe for this bundle or take a look at all the files and configurations in the repository that would normally have been executed if the recipe had been executed.