Skip to content

Commit ceae41b

Browse files
authored
topup (#218)
1 parent bcfdbf1 commit ceae41b

File tree

184 files changed

+2526
-1861
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

184 files changed

+2526
-1861
lines changed

apps/docs/content/bun/how-to/build-pipeline.mdx

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ import UnorderedCodeList from 'docs/src/components/UnorderedCodeList';
99

1010
Zerops provides a customizable build and runtime environment for your Bun application.
1111

12-
## Add zerops.yml to your repository
12+
## Add zerops.yaml to your repository
1313

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:
1515

16-
```yml
16+
```yaml
1717
zerops:
1818
# define hostname of your service
1919
- setup: app
@@ -78,9 +78,9 @@ The top-level element is always `zerops`.
7878
### Setup
7979

8080
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`:
8282

83-
```yml
83+
```yaml
8484
zerops:
8585
# definition for app service
8686
- setup: app
@@ -105,7 +105,7 @@ Following options are available for Bun builds:
105105

106106
<UnorderedCodeList data={data.bun.base} />
107107

108-
```yml
108+
```yaml
109109
zerops:
110110
# hostname of your service
111111
- setup: app
@@ -124,12 +124,12 @@ zerops:
124124
</p>
125125

126126
:::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.
128128
:::
129129

130130
If you need to install more technologies to the build environment, set multiple values as a yaml array. For example:
131131

132-
```yml
132+
```yaml
133133
zerops:
134134
# hostname of your service
135135
- setup: app
@@ -143,7 +143,7 @@ zerops:
143143
...
144144
```
145145

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).
147147

148148
To customise your build environment use the [prepareCommands](bun/how-to/build-pipeline#preparecommands) attribute.
149149

@@ -188,7 +188,7 @@ The base build environment contains:
188188

189189
To install additional packages or tools add one or more prepare commands:
190190

191-
```yml
191+
```yaml
192192
zerops:
193193
# hostname of your service
194194
- setup: app
@@ -229,7 +229,7 @@ You can configure your prepare commands to be run in a single shell instance or
229229

230230
_REQUIRED._ Defines build commands.
231231

232-
```yml
232+
```yaml
233233
zerops:
234234
# hostname of your service
235235
- setup: app
@@ -257,7 +257,7 @@ Before the build commands are triggered the build container contains:
257257

258258
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.
259259

260-
```yml
260+
```yaml
261261
buildCommands:
262262
- |
263263
bun i
@@ -268,7 +268,7 @@ buildCommands:
268268

269269
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.
270270

271-
```yml
271+
```yaml
272272
buildCommands:
273273
- bun i
274274
- bun run build
@@ -278,7 +278,7 @@ buildCommands:
278278

279279
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.
280280

281-
```yml
281+
```yaml
282282
buildCommands:
283283
- bun i --verbose
284284
- bun run build
@@ -290,7 +290,7 @@ If the command ends successfully, it returns the exit code 0 and Zerops triggers
290290

291291
_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.
292292

293-
```yml
293+
```yaml
294294
# REQUIRED. Select which files / folders to deploy after
295295
# the build has successfully finished
296296
deployFiles:
@@ -301,29 +301,29 @@ deployFiles:
301301

302302
Determines files or folders produced by your build, which should be deployed to your runtime service containers.
303303

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.
305305

306306
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`.
307307

308308
#### Examples
309309

310310
Deploys a folder, and a file from the project root directory:
311311

312-
```yml
312+
```yaml
313313
deployFiles:
314314
- dist
315315
- package.json
316316
```
317317

318318
Deploys the whole content of the build container:
319319

320-
```yml
320+
```yaml
321321
deployFiles: .
322322
```
323323

324324
Deploys a folder, and a file in a defined path:
325325

326-
```yml
326+
```yaml
327327
deployFiles:
328328
- ./path/to/file.txt
329329
- ./path/to/dir/
@@ -335,19 +335,19 @@ Zerops supports the `~` character as a wildcard for one or more folders in the p
335335

336336
Deploys all `file.txt` files that are located in any path that begins with `/path/` and ends with `/to/`
337337

338-
```yml
338+
```yaml
339339
deployFiles: ./path/~/to/file.txt
340340
```
341341

342342
Deploys all folders that are located in any path that begins with `/path/to/`
343343

344-
```yml
344+
```yaml
345345
deployFiles: ./path/to/~/
346346
```
347347

348348
Deploys all folders that are located in any path that begins with `/path/` and ends with `/to/`
349349

350-
```yml
350+
```yaml
351351
deployFiles: ./path/~/to/
352352
```
353353

@@ -366,7 +366,7 @@ For consistency, it's recommended to configure both your `.gitignore` and `.depl
366366

367367
Examples:
368368

369-
```yml title="zerops.yml"
369+
```yaml title="zerops.yaml"
370370
zerops:
371371
- setup: app
372372
build:
@@ -393,7 +393,7 @@ This example above ignores `file.txt` in ANY directory named `src`, such as:
393393

394394
_OPTIONAL._ Defines which files or folders will be cached for the next build.
395395

396-
```yml
396+
```yaml
397397
# OPTIONAL. Which files / folders you want to cache for the next build.
398398
# Next builds will be faster when the cache is used.
399399
cache: file.txt
@@ -411,7 +411,7 @@ _OPTIONAL._ Defines the environment variables for the build environment.
411411

412412
Enter one or more env variables in following format:
413413

414-
```yml
414+
```yaml
415415
zerops:
416416
# define hostname of your service
417417
- setup: app
@@ -442,7 +442,7 @@ Following options are available for Bun runtimes:
442442

443443
<UnorderedCodeList data={data.bun.base} />
444444

445-
```yml
445+
```yaml
446446
zerops:
447447
# hostname of your service
448448
- setup: app
@@ -465,12 +465,12 @@ zerops:
465465
</p>
466466

467467
:::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.
469469
:::
470470

471471
If you need to install more technologies to the runtime environment, set multiple values as a yaml array. For example:
472472

473-
```yml
473+
```yaml
474474
zerops:
475475
# hostname of your service
476476
- setup: app
@@ -490,7 +490,7 @@ zerops:
490490
...
491491
```
492492

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).
494494

495495
To customise your build environment use the `prepareCommands` attribute.
496496

@@ -540,7 +540,7 @@ _OPTIONAL._ Customises the Bun runtime environment by installing additional depe
540540
additional packages or tools add one or more prepare commands:
541541
</p>
542542

543-
```yml
543+
```yaml
544544
zerops:
545545
# hostname of your service
546546
- setup: app
@@ -594,14 +594,14 @@ You can configure your prepare commands to be run in a single shell instance or
594594

595595
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).
596596

597-
```yml
597+
```yaml
598598
zerops:
599599
# hostname of your service
600600
- setup: app
601601
# ==== how to build your application ====
602602
build:
603603
...
604-
addToRunPrepare: ./runtime-config.yml
604+
addToRunPrepare: ./runtime-config.yaml
605605
606606
# ==== how to run your application ====
607607
run:
@@ -613,13 +613,13 @@ zerops:
613613
...
614614
```
615615

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.
617617

618618
### initCommands
619619

620620
_OPTIONAL._ Defines one or more commands to be run each time a new runtime container is started or a container is restarted.
621621

622-
```yml
622+
```yaml
623623
zerops:
624624
# hostname of your service
625625
- setup: app
@@ -659,7 +659,7 @@ _OPTIONAL._ Defines the environment variables for the runtime environment.
659659

660660
Enter one or more env variables in following format:
661661

662-
```yml
662+
```yaml
663663
zerops:
664664
# define hostname of your service
665665
- setup: app
@@ -680,7 +680,7 @@ Read more about [environment variables](bun/how-to/env-variables) in Zerops.
680680

681681
_REQUIRED._ Defines the start command for your Bun application.
682682

683-
```yml
683+
```yaml
684684
zerops:
685685
# hostname of your service
686686
- setup: app
@@ -716,7 +716,7 @@ Following attributes are available:
716716

717717
**Example:**
718718

719-
```yml
719+
```yaml
720720
zerops:
721721
# hostname of your service
722722
- setup: app
@@ -749,7 +749,7 @@ Following attributes are available:
749749

750750
**Example:**
751751

752-
```yml
752+
```yaml
753753
zerops:
754754
# hostname of your service
755755
- setup: app
@@ -778,7 +778,7 @@ _OPTIONAL._ Defines cron jobs.
778778

779779
Setup cron jobs in the following format:
780780

781-
```yml
781+
```yaml
782782
zerops:
783783
# define hostname of your service
784784
- setup: app
@@ -817,7 +817,7 @@ Following attributes are available:
817817

818818
**Example:**
819819

820-
```yml
820+
```yaml
821821
zerops:
822822
# hostname of your service
823823
- setup: app
@@ -850,7 +850,7 @@ Following attributes are available:
850850

851851
**Example:**
852852

853-
```yml
853+
```yaml
854854
zerops:
855855
# hostname of your service
856856
- setup: app

apps/docs/content/bun/how-to/build-process.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@ The build cancellation is available before the build pipeline is finished. When
5454
The default Bun build environment contains:
5555

5656
- <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
5858
- [zCLI](/references/cli), Zerops command line tool
5959
- `npm`, `yarn`, `git` and `npx` tools
6060

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`.
6262

6363
:::info
6464
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
104104

105105
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.
106106

107-
```yml
107+
```yaml
108108
buildCommands:
109109
- npm i --verbose
110110
- npm run build

0 commit comments

Comments
 (0)