Skip to content

Commit 9df35a6

Browse files
doc: update README.md
1 parent 2134f12 commit 9df35a6

File tree

1 file changed

+35
-11
lines changed

1 file changed

+35
-11
lines changed

README.md

Lines changed: 35 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ Linux operating system with:
3232

3333
First clone this repository:
3434

35-
``` shell
35+
```shell
3636
git clone https://github.com/EdgeTX/cloudbuild.git
3737
```
3838

3939
Then you will need to configure some things:
4040

41-
``` shell
41+
```shell
4242
# Create config from template
4343
cp api.env.example api.env
4444
```
@@ -47,7 +47,7 @@ For a quick test, all you need to edit is external URL (as it will be seen by we
4747
and the directory in which the firmwares are stored (which should be shared among all
4848
containers as a volume).
4949

50-
```
50+
```env
5151
EBUILD_STORAGE_PATH=/home/rootless/src/static/firmwares
5252
EBUILD_DOWNLOAD_URL=http://localhost:3000/firmwares
5353
```
@@ -56,7 +56,7 @@ EBUILD_DOWNLOAD_URL=http://localhost:3000/firmwares
5656

5757
The runtime container image can be built with:
5858

59-
``` shell
59+
```shell
6060
docker compose build api
6161
```
6262

@@ -66,19 +66,19 @@ docker compose build api
6666

6767
Start the database first:
6868

69-
``` shell
69+
```shell
7070
docker compose up -d db
7171
```
7272

7373
Then start the API:
7474

75-
``` shell
75+
```shell
7676
docker compose up -d api
7777
```
7878

7979
And setup the database schema with:
8080

81-
``` shell
81+
```shell
8282
docker exec -it cloudbuild-api-1 ./ebuild db migrate
8383
```
8484

@@ -88,7 +88,7 @@ Once the database is setup, proceed to the next step to start the workers as wel
8888

8989
Then the rest of the stack can be run all together:
9090

91-
``` shell
91+
```shell
9292
docker compose up -d --scale worker=2
9393
```
9494

@@ -100,7 +100,7 @@ You can increase the number of workers if you want to build more firmwares in pa
100100
To offload serving the firmware files to a S3 compatible storage, a few configuration
101101
parameters need to be set additionally in the environment file (`api.env`):
102102

103-
```
103+
```env
104104
# Common settings for all provider
105105
EBUILD_STORAGE_TYPE: S3
106106
EBUILD_S3_ACCESS_KEY: myAccessKey
@@ -118,15 +118,39 @@ EBUILD_DOWNLOAD_URL: https://bucket.s3.super-provider.com
118118

119119
To be able to use the administrative UI, a token must be generated for every user:
120120

121-
``` shell
121+
```shell
122122
docker exec -it cloudbuild-api-1 ./ebuild auth create [some name]
123123
AccessKey: [some access key]
124124
SecretKey: [very secret key]
125125
```
126126

127127
The token can be later removed:
128128

129-
``` shell
129+
```shell
130130
docker exec -it cloudbuild-api-1 ./ebuild auth remove [Access Key]
131131
token [Access Key] removed
132132
```
133+
134+
## Using a local Git mirror
135+
136+
To speed up builds, it is possible to use a local mirror by changing
137+
the repository URL:
138+
```env
139+
EBUILD_SRC_REPO=http://local-mirror:8080/EdgeTX/edgetx
140+
```
141+
142+
[cloudbuild-mirror](https://github.com/EdgeTX/cloudbuild-mirror) can be
143+
used as a local mirror. It also supports automatic refreshing of the
144+
targets (see next section).
145+
146+
## Refresh targets automatically from URL
147+
148+
It is also possible to fetch `targets.json` from a URL instead of a local
149+
file. In that case, the targets are refreshed automatically (defaults to 5 minutes interval).
150+
151+
```env
152+
# Use cloudbuild mirrored repository as the source for targets.json
153+
EBUILD_TARGETS=http://local-mirror:8080/gitweb.cgi?p=EdgeTX/cloudbuild.git;a=blob_plain;f=targets.json;hb=HEAD
154+
# This is the default refresh interval in seconds
155+
EBUILD_TARGETS_REFRESH_INTERVAL=300
156+
```

0 commit comments

Comments
 (0)