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: apps/docs/content/bun/how-to/build-pipeline.mdx
+41-41Lines changed: 41 additions & 41 deletions
Original file line number
Diff line number
Diff line change
@@ -9,11 +9,11 @@ import UnorderedCodeList from 'docs/src/components/UnorderedCodeList';
9
9
10
10
Zerops provides a customizable build and runtime environment for your Bun application.
11
11
12
-
## Add zerops.yml to your repository
12
+
## Add zerops.yaml to your repository
13
13
14
-
Start by adding `zerops.yml` file to the **root of your repository** and modify it to fit your application:
14
+
Start by adding `zerops.yaml` file to the **root of your repository** and modify it to fit your application:
15
15
16
-
```yml
16
+
```yaml
17
17
zerops:
18
18
# define hostname of your service
19
19
- setup: app
@@ -78,9 +78,9 @@ The top-level element is always `zerops`.
78
78
### Setup
79
79
80
80
The first element `setup` contains the **hostname** of your service. A runtime service with the same hostname must exist in Zerops.
81
-
Zerops supports the definition of multiple runtime services in a single `zerops.yml`. This is useful when you use a monorepo. Just add multiple setup elements in your `zerops.yml`:
81
+
Zerops supports the definition of multiple runtime services in a single `zerops.yaml`. This is useful when you use a monorepo. Just add multiple setup elements in your `zerops.yaml`:
82
82
83
-
```yml
83
+
```yaml
84
84
zerops:
85
85
# definition for app service
86
86
- setup: app
@@ -105,7 +105,7 @@ Following options are available for Bun builds:
105
105
106
106
<UnorderedCodeList data={data.bun.base} />
107
107
108
-
```yml
108
+
```yaml
109
109
zerops:
110
110
# hostname of your service
111
111
- setup: app
@@ -124,12 +124,12 @@ zerops:
124
124
</p>
125
125
126
126
:::info
127
-
You can change the base environment when you need to. Just simply modify the `zerops.yml` in your repository.
127
+
You can change the base environment when you need to. Just simply modify the `zerops.yaml` in your repository.
128
128
:::
129
129
130
130
If you need to install more technologies to the build environment, set multiple values as a yaml array. For example:
131
131
132
-
```yml
132
+
```yaml
133
133
zerops:
134
134
# hostname of your service
135
135
- setup: app
@@ -143,7 +143,7 @@ zerops:
143
143
...
144
144
```
145
145
146
-
See the full list of supported [build base environments](/zerops-yml/base-list#runtime-services).
146
+
See the full list of supported [build base environments](/zerops-yaml/base-list#runtime-services).
147
147
148
148
To customise your build environment use the [prepareCommands](bun/how-to/build-pipeline#preparecommands) attribute.
149
149
@@ -188,7 +188,7 @@ The base build environment contains:
188
188
189
189
To install additional packages or tools add one or more prepare commands:
190
190
191
-
```yml
191
+
```yaml
192
192
zerops:
193
193
# hostname of your service
194
194
- setup: app
@@ -229,7 +229,7 @@ You can configure your prepare commands to be run in a single shell instance or
229
229
230
230
_REQUIRED._ Defines build commands.
231
231
232
-
```yml
232
+
```yaml
233
233
zerops:
234
234
# hostname of your service
235
235
- setup: app
@@ -257,7 +257,7 @@ Before the build commands are triggered the build container contains:
257
257
258
258
Use following syntax to run all commands in the same environment context. For example, if one command changes the current directory, the next command continues in that directory. When one command creates an environment variable, the next command can access it.
259
259
260
-
```yml
260
+
```yaml
261
261
buildCommands:
262
262
- |
263
263
bun i
@@ -268,7 +268,7 @@ buildCommands:
268
268
269
269
When the following syntax is used, each command is triggered in a separate environment context. For example, each shell instance starts in the home directory again. When one command creates an environment variable, it won't be available for the next command.
270
270
271
-
```yml
271
+
```yaml
272
272
buildCommands:
273
273
- bun i
274
274
- bun run build
@@ -278,7 +278,7 @@ buildCommands:
278
278
279
279
If any command fails, it returns an exit code other than 0 and the build is canceled. Read the [build log](bun/how-to/logs#build-log) to troubleshoot the error. If the error log doesn't contain any specific error message, try to run your build with the --verbose option.
280
280
281
-
```yml
281
+
```yaml
282
282
buildCommands:
283
283
- bun i --verbose
284
284
- bun run build
@@ -290,7 +290,7 @@ If the command ends successfully, it returns the exit code 0 and Zerops triggers
290
290
291
291
_REQUIRED._ Selects which files or folders will be deployed after the build has successfully finished. To filter out specific files or folders, use <a href="#deployignore">`.deployignore`</a> file.
292
292
293
-
```yml
293
+
```yaml
294
294
# REQUIRED. Select which files / folders to deploy after
295
295
# the build has successfully finished
296
296
deployFiles:
@@ -301,29 +301,29 @@ deployFiles:
301
301
302
302
Determines files or folders produced by your build, which should be deployed to your runtime service containers.
303
303
304
-
The path starts from the **root directory** of your project (the location of `zerops.yml`). You must enclose the name in quotes if the folder or the file name contains a space.
304
+
The path starts from the **root directory** of your project (the location of `zerops.yaml`). You must enclose the name in quotes if the folder or the file name contains a space.
305
305
306
306
The files/folders will be placed into `/var/www` folder in runtime, e.g. `./src/assets/fonts` would result in `/var/www/src/assets/fonts`.
307
307
308
308
#### Examples
309
309
310
310
Deploys a folder, and a file from the project root directory:
311
311
312
-
```yml
312
+
```yaml
313
313
deployFiles:
314
314
- dist
315
315
- package.json
316
316
```
317
317
318
318
Deploys the whole content of the build container:
319
319
320
-
```yml
320
+
```yaml
321
321
deployFiles: .
322
322
```
323
323
324
324
Deploys a folder, and a file in a defined path:
325
325
326
-
```yml
326
+
```yaml
327
327
deployFiles:
328
328
- ./path/to/file.txt
329
329
- ./path/to/dir/
@@ -335,19 +335,19 @@ Zerops supports the `~` character as a wildcard for one or more folders in the p
335
335
336
336
Deploys all `file.txt` files that are located in any path that begins with `/path/` and ends with `/to/`
337
337
338
-
```yml
338
+
```yaml
339
339
deployFiles: ./path/~/to/file.txt
340
340
```
341
341
342
342
Deploys all folders that are located in any path that begins with `/path/to/`
343
343
344
-
```yml
344
+
```yaml
345
345
deployFiles: ./path/to/~/
346
346
```
347
347
348
348
Deploys all folders that are located in any path that begins with `/path/` and ends with `/to/`
349
349
350
-
```yml
350
+
```yaml
351
351
deployFiles: ./path/~/to/
352
352
```
353
353
@@ -366,7 +366,7 @@ For consistency, it's recommended to configure both your `.gitignore` and `.depl
366
366
367
367
Examples:
368
368
369
-
```yml title="zerops.yml"
369
+
```yaml title="zerops.yaml"
370
370
zerops:
371
371
- setup: app
372
372
build:
@@ -393,7 +393,7 @@ This example above ignores `file.txt` in ANY directory named `src`, such as:
393
393
394
394
_OPTIONAL._ Defines which files or folders will be cached for the next build.
395
395
396
-
```yml
396
+
```yaml
397
397
# OPTIONAL. Which files / folders you want to cache for the next build.
398
398
# Next builds will be faster when the cache is used.
399
399
cache: file.txt
@@ -411,7 +411,7 @@ _OPTIONAL._ Defines the environment variables for the build environment.
411
411
412
412
Enter one or more env variables in following format:
413
413
414
-
```yml
414
+
```yaml
415
415
zerops:
416
416
# define hostname of your service
417
417
- setup: app
@@ -442,7 +442,7 @@ Following options are available for Bun runtimes:
442
442
443
443
<UnorderedCodeList data={data.bun.base} />
444
444
445
-
```yml
445
+
```yaml
446
446
zerops:
447
447
# hostname of your service
448
448
- setup: app
@@ -465,12 +465,12 @@ zerops:
465
465
</p>
466
466
467
467
:::info
468
-
You can change the base environment when you need to. Just simply modify the `zerops.yml` in your repository.
468
+
You can change the base environment when you need to. Just simply modify the `zerops.yaml` in your repository.
469
469
:::
470
470
471
471
If you need to install more technologies to the runtime environment, set multiple values as a yaml array. For example:
472
472
473
-
```yml
473
+
```yaml
474
474
zerops:
475
475
# hostname of your service
476
476
- setup: app
@@ -490,7 +490,7 @@ zerops:
490
490
...
491
491
```
492
492
493
-
See the full list of supported [run base environments](/zerops-yml/base-list).
493
+
See the full list of supported [run base environments](/zerops-yaml/base-list).
494
494
495
495
To customise your build environment use the `prepareCommands` attribute.
496
496
@@ -540,7 +540,7 @@ _OPTIONAL._ Customises the Bun runtime environment by installing additional depe
540
540
additional packages or tools add one or more prepare commands:
541
541
</p>
542
542
543
-
```yml
543
+
```yaml
544
544
zerops:
545
545
# hostname of your service
546
546
- setup: app
@@ -594,14 +594,14 @@ You can configure your prepare commands to be run in a single shell instance or
594
594
595
595
The prepare runtime container does not contain your application code nor the built application. If you need to copy some folders or files from the build container to the runtime container (e.g. a configuration file) use the `addToRunPrepare` attribute in the [build section](#build-pipeline-configuration).
596
596
597
-
```yml
597
+
```yaml
598
598
zerops:
599
599
# hostname of your service
600
600
- setup: app
601
601
# ==== how to build your application ====
602
602
build:
603
603
...
604
-
addToRunPrepare: ./runtime-config.yml
604
+
addToRunPrepare: ./runtime-config.yaml
605
605
606
606
# ==== how to run your application ====
607
607
run:
@@ -613,13 +613,13 @@ zerops:
613
613
...
614
614
```
615
615
616
-
In the example above Zerops will copy the `runtime-config.yml` file from your build container **after the build has finished** into the new **prepare runtime** container. The copied files and folders will be available in the `xxx` folder in the new prepare runtime container before the prepare commands are triggered.
616
+
In the example above Zerops will copy the `runtime-config.yaml` file from your build container **after the build has finished** into the new **prepare runtime** container. The copied files and folders will be available in the `xxx` folder in the new prepare runtime container before the prepare commands are triggered.
617
617
618
618
### initCommands
619
619
620
620
_OPTIONAL._ Defines one or more commands to be run each time a new runtime container is started or a container is restarted.
621
621
622
-
```yml
622
+
```yaml
623
623
zerops:
624
624
# hostname of your service
625
625
- setup: app
@@ -659,7 +659,7 @@ _OPTIONAL._ Defines the environment variables for the runtime environment.
659
659
660
660
Enter one or more env variables in following format:
661
661
662
-
```yml
662
+
```yaml
663
663
zerops:
664
664
# define hostname of your service
665
665
- setup: app
@@ -680,7 +680,7 @@ Read more about [environment variables](bun/how-to/env-variables) in Zerops.
680
680
681
681
_REQUIRED._ Defines the start command for your Bun application.
682
682
683
-
```yml
683
+
```yaml
684
684
zerops:
685
685
# hostname of your service
686
686
- setup: app
@@ -716,7 +716,7 @@ Following attributes are available:
716
716
717
717
**Example:**
718
718
719
-
```yml
719
+
```yaml
720
720
zerops:
721
721
# hostname of your service
722
722
- setup: app
@@ -749,7 +749,7 @@ Following attributes are available:
Copy file name to clipboardExpand all lines: apps/docs/content/bun/how-to/build-process.mdx
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -54,11 +54,11 @@ The build cancellation is available before the build pipeline is finished. When
54
54
The default Bun build environment contains:
55
55
56
56
- <span>{data.alpine.default}</span>
57
-
- selected version of Bun defined in `zerops.yml`[build.base](bun/how-to/build-pipeline#base) parameter
57
+
- selected version of Bun defined in `zerops.yaml`[build.base](bun/how-to/build-pipeline#base) parameter
58
58
-[zCLI](/references/cli), Zerops command line tool
59
59
-`npm`, `yarn`, `git` and `npx` tools
60
60
61
-
If you prefer the Ubuntu OS instead of Alpine, set the [build.os](/bun/how-to/build-pipeline#os) attribute to `ubuntu`. To install additional packages or tools add one or more [build.prepareCommands](bun/how-to/build-pipeline#preparecommands) commands to your `zerops.yml`.
61
+
If you prefer the Ubuntu OS instead of Alpine, set the [build.os](/bun/how-to/build-pipeline#os) attribute to `ubuntu`. To install additional packages or tools add one or more [build.prepareCommands](bun/how-to/build-pipeline#preparecommands) commands to your `zerops.yaml`.
62
62
63
63
:::info
64
64
The application code is available in the `/var/www` folder in your build container before the prepare commands are triggered. This allows you to use any file from your application code in your prepare commands (e.g. a configuration file).
@@ -104,7 +104,7 @@ This will force Zerops to run the next build clean, including all prepare comman
104
104
105
105
If any [build command](bun/how-to/build-pipeline#buildcommands) fails, it returns an exit code other than 0 and the build is canceled. Read the [build log](bun/how-to/logs#build-log) to troubleshoot the error. If the error log doesn't contain any specific error message, try to run your build with the `--verbose` option.
0 commit comments