You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/core-concept/satellite/_index.en.md
+38Lines changed: 38 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -95,6 +95,44 @@ satellites:
95
95
#...
96
96
```
97
97
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
+
98
136
### Configure Composer
99
137
100
138
It's possible to declare the Composer dependencies, autoloads, repositories and auths that our microservice needs with the `composer` key.
0 commit comments