Files

82 lines
2.3 KiB
Markdown

# App Store Mimic Flow
This flow lets you test a deployment that behaves like a marketplace install (no live source-tree app mount).
## Why this exists
By default, Docker compose mounts `./nextcloud/custom_apps` into the app container.
That is convenient for development, but it is not how a customer install from the Nextcloud app store behaves.
## What changed
- Compose now uses `NEXTCLOUD_CUSTOM_APPS_PATH`:
- `docker-compose.yml`
- `docker-compose.postgres.yml`
- `docker-compose.devprod.yml`
- `docker-compose.devprod.nossl.yml`
- New helper script:
- `scripts/setup-appstore-mimic.sh`
## One-time preparation
1. Configure your env file (example uses devprod):
```bash
cp .env.devprod.example .env.devprod
```
2. Switch the env to isolated custom apps path and seed apps there:
```bash
./scripts/setup-appstore-mimic.sh --env-file .env.devprod
```
This sets:
- `NEXTCLOUD_CUSTOM_APPS_PATH=./nextcloud/custom_apps_appstore`
It also seeds:
- `qortal_integration` (copied once into isolated path)
- `user_oidc` (packaged app with vendor deps via `ensure-user-oidc-app.sh`)
## Start stack in mimic mode
Use your normal installer/start flow:
```bash
./scripts/install-production-docker.sh --mode nossl --with-external-auth --env-file .env.devprod
```
or
```bash
./start-devprod.sh --nossl --extauth
```
## Verify mimic behavior
1. Confirm mount path is isolated:
```bash
docker compose -f docker-compose.devprod.nossl.yml --env-file .env.devprod exec -T app sh -lc 'ls -1 /var/www/html/custom_apps'
```
2. Confirm required apps are enabled:
```bash
docker compose -f docker-compose.devprod.nossl.yml --env-file .env.devprod exec -T app php occ app:list | rg -n "qortal_integration|user_oidc|nuqloud_scrum"
```
3. Confirm OIDC provider still exists:
```bash
docker compose -f docker-compose.devprod.nossl.yml --env-file .env.devprod exec -T app php occ user_oidc:provider --help
```
## When the app is published in the marketplace
For a stricter app-store simulation:
1. Remove seeded `qortal_integration` from `NEXTCLOUD_CUSTOM_APPS_PATH`.
2. Install from app store in Nextcloud UI (or `occ app:install qortal_integration` if available in your channel).
3. Re-run setup/repair actions:
```bash
./scripts/finish-initial-setup.sh --nossl --env-file .env.devprod
```
`user_oidc` can remain seeded if your environment cannot reliably fetch marketplace apps.