# {{TITLE}} An app for Federated Core, made with [coreapp-dev](https://gitea.federated.computer/Federated_Computer/coreapp-dev). ## Develop Change the app (`Dockerfile`, `www/`), then, in this folder: ``` coreapp deploy # build the image, copy it to the Core in your VM, install or update coreapp check # https://{{NAME}}./ answers, with a valid certificate coreapp logs -f # its log coreapp status # its container, address and URL coreapp shell # a shell in its container coreapp remove # uninstall it from the Core ``` ## Files The app is in the format Federated Core installs apps from (`/federated/services/{{NAME}}/` on the Core): | File | What it is | |---|---| | `service` | Name, description, image (`CONTAINER`), `VERSION`, `INTERNAL_IP`, apps it needs (`DEPENDS`, e.g. `postgresql`), and how to check it's up (`MONITOR`) | | `docker-compose.yml.in` | The container(s), on the Core's `core` network at `INTERNAL_IP`, with the traefik labels that give it `https://{{NAME}}.` | | `env.in` | Its settings, as the `.env` file next to the compose file | | `install` | Run by the Core's `installapp`; fills in the templates | | `icon.png` | Its icon in the Core's dashboard | | `Dockerfile`, `www/` | The app itself (not copied to the Core) | In `docker-compose.yml.in` and `env.in`, the Core replaces, once at install: - `@DOMAIN@`: the Core's domain, and any other variable in `/etc/federated` - `@VERSION@`, `@CONTAINER@`, `@INTERNAL_IP@`: from `service` - `@SECRET:RANDOM:LLLLLLLL@`: a random value (`L` a letter or digit, `a` lowercase, `A` uppercase, `0` a digit, `x` hex), also available as `@SECRET@` further down `${...}` is left for Docker Compose, which reads it from `.env`. Raise `VERSION` in `service` for each release. The Core's nightly upgrade only redeploys an app when `VERSION` differs from `IMAGE_VERSION` in its `.env`.