Skip to content

Commit

Permalink
feat(tool): Add hack to run Neon on web
Browse files Browse the repository at this point in the history
Signed-off-by: provokateurin <[email protected]>
  • Loading branch information
provokateurin committed Feb 1, 2024
1 parent ecf4b3a commit bfba720
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
10 changes: 10 additions & 0 deletions packages/app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ A beautiful convergent cross-platform client for Nextcloud written in Flutter.
You can build it yourself from source or download it from the automatic build pipelines.
The app will be published on F-Droid, the Google Playstore and Flathub later on.

## Run on web

Due to CORS issues it is not possible to run the app in debug mode.

```bash
fvm flutter build web --base-href /neon/ # Use --profile to build faster and get better error messages.
```

Use `./tool/dev.sh` from the root of the repository and go to http://localhost/neon.

## Screenshots

For more screenshots see `./screenshots/`.
Expand Down
7 changes: 6 additions & 1 deletion tool/dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@ echo "Running development instance on http://localhost. To access it in an Andro

tag="$(preset_image_tag "$preset")"
volume="nextcloud-neon-dev-$(echo "$tag" | cut -d ":" -f 2)"
container="$(docker run -d --rm -v "$volume":/usr/src/nextcloud -v "$volume":/var/www/html -p "80:80" --add-host=host.docker.internal:host-gateway "$tag")"
args=()
if [ -d packages/app/build/web ]; then
args=(-v ./packages/app/build/web:/var/www/html/neon -v ./packages/app/build/web:/usr/src/nextcloud/neon)
fi
# shellcheck disable=SC2086
container="$(docker run -d --rm -v "$volume":/usr/src/nextcloud -v "$volume":/var/www/html ${args[*]} -p "80:80" --add-host=host.docker.internal:host-gateway "$tag")"
function cleanup() {
docker kill "$container"
}
Expand Down

0 comments on commit bfba720

Please sign in to comment.