Skip to content

Commit 40b7746

Browse files
authored
Add copy's section to the core page of the documentation (#71)
* Add copy's section to the core page of the documentation * add some link in the new section
1 parent a53c4d1 commit 40b7746

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

content/core-concept/satellite/_index.en.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,44 @@ satellites:
9595
#...
9696
```
9797

98+
#### Add custom code without a Composer package
99+
100+
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.
101+
102+
Supported by [Docker](#using-docker-) and [Filesystem](#using-the-file-system) adapters.
103+
104+
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.
105+
106+
```yaml
107+
version: '0.3'
108+
satellites:
109+
my_satellite:
110+
label: 'My first Satellite'
111+
filesystem:
112+
copy:
113+
- from: '../Foo/Bar'
114+
to: '../build/Foo/Bar'
115+
path: ../build # path to the build directory, relative to the YAML file
116+
#...
117+
```
118+
119+
```yaml
120+
version: '0.3'
121+
satellites:
122+
my_satellite:
123+
label: 'My first Satellite'
124+
docker:
125+
from: php:8.0-cli-alpine
126+
workdir: /var/www/html
127+
tags:
128+
- acmeinc/my-satellite:latest
129+
- acmeinc/my-satellite:1.0.0
130+
copy:
131+
- from: '../Foo/Bar'
132+
to: './src/Foo/Bar'
133+
#...
134+
```
135+
98136
### Configure Composer
99137

100138
It's possible to declare the Composer dependencies, autoloads, repositories and auths that our microservice needs with the `composer` key.

0 commit comments

Comments
 (0)