Skip to content

Commit

Permalink
feat: add magic value to document
Browse files Browse the repository at this point in the history
  • Loading branch information
CorrectRoadH committed Jun 23, 2023
1 parent 46441e0 commit 8896fe0
Showing 1 changed file with 33 additions and 1 deletion.
34 changes: 33 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ Each directory under [Apps](Apps) correspond to a CasaOS App. The directory shou
en_us: Syncthing Accessible Directory.
```

1. Compose app level
2. Compose app level

For the same example, at the bottom of the [`docker-compose.yml` of Syncthing](Apps/Syncthing/docker-compose.yml)

Expand Down Expand Up @@ -131,6 +131,38 @@ Each directory under [Apps](Apps) correspond to a CasaOS App. The directory shou
port_map: "8384" # the port for web UI
```
3. Magic Value
**Note: The features is only working in casaos 0.4.5**
For same case. Casaos provide some magic value to power your application:
- $OPENAI_API_KEY
- $WEBUI_PORT
##### $OPENAI_API_KEY
your application can read `OPENAI_API_KEY` from env variable. It is set in `/etc/casaos/app-management`. User can set only once and using anywhere.

#### WEBUI_PORT

your `docker-compose.yml` can use `WEBUI_PORT` to set webui port. Casaos will assign a available port for your application. You can use it like this:

```yaml
...
ports:
- target: 5230
published: ${WEBUI_PORT:-5230}
protocol: tcp
...
x-casaos:
architectures:
- amd64
- arm64
- arm
...
port_map: ${WEBUI_PORT:-5230}
```
#### Specifications of Icon, Thumbnail and Screenshots

- Icon image should be a transparent background PNG image with a size of 192x192 pixels.
Expand Down

0 comments on commit 8896fe0

Please sign in to comment.