From 6cd675cfa946f1e4b1f03b5a1fcff8893a966611 Mon Sep 17 00:00:00 2001 From: Jonathan Date: Fri, 12 Jan 2024 12:28:27 +0100 Subject: [PATCH 1/2] Add copy's section to the core page of the documentation --- content/core-concept/satellite/_index.en.md | 36 +++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/content/core-concept/satellite/_index.en.md b/content/core-concept/satellite/_index.en.md index 6253838..1ee8ffd 100644 --- a/content/core-concept/satellite/_index.en.md +++ b/content/core-concept/satellite/_index.en.md @@ -96,6 +96,42 @@ satellites: #... ``` +#### Copy custom files + +You want to use a class but you can't add a package to your composer ? Use the copy option under de docker/filesystem key. + +The build will copy files you indicate on the yaml to the path you provide. If you are a class with namespace, don't forget to add it to your autoload (see autoload section lower) + +```yaml +version: '0.3' +satellites: + my_satellite: + label: 'My first Satellite' + filesystem: + copy: + - from: '../Foo/Bar' + to: '../build/Foo/Bar' + path: ../build # path to the build directory, relative to the YAML file +#... +``` + +```yaml +version: '0.3' +satellites: + my_satellite: + label: 'My first Satellite' + docker: + from: php:8.0-cli-alpine + workdir: /var/www/html + tags: + - acmeinc/my-satellite:latest + - acmeinc/my-satellite:1.0.0 + copy: + - from: '../Foo/Bar' + to: './src/Foo/Bar' +#... +``` + ### Configure Composer It's possible to declare the Composer dependencies, autoloads, repositories and auths that our microservice needs with the `composer` key. From 387e9f3b3bc21598095703c6132196ebd5dc5a2f Mon Sep 17 00:00:00 2001 From: Jonathan Date: Wed, 17 Jan 2024 12:05:31 +0100 Subject: [PATCH 2/2] add some link in the new section --- content/core-concept/satellite/_index.en.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/content/core-concept/satellite/_index.en.md b/content/core-concept/satellite/_index.en.md index 1ee8ffd..9abd911 100644 --- a/content/core-concept/satellite/_index.en.md +++ b/content/core-concept/satellite/_index.en.md @@ -96,11 +96,13 @@ satellites: #... ``` -#### Copy custom files +#### Add custom code without a Composer package -You want to use a class but you can't add a package to your composer ? Use the copy option under de docker/filesystem key. +Sometimes you need to use a custom class but you can't add a composer package, or creating this package is a disproportional effort. In this cas you have the `copy` options under the adapter. -The build will copy files you indicate on the yaml to the path you provide. If you are a class with namespace, don't forget to add it to your autoload (see autoload section lower) +Supported by [Docker](#using-docker-) and [Filesystem](#using-the-file-system) adapters. + +The build will copy files you list. If you use a class with a namespace, you will need to add the namespace to the [autoloading](#autoload) specification. ```yaml version: '0.3'