mirror of
https://git.launchpad.net/~vhaudiquet/+git/flutter-artifacts-proxy
synced 2026-02-12 01:25:53 +00:00
main
- Stop ignoring static index file - Automatically pull flutter artifacts from Launchpad - Allow nginx to list files in directories
Flutter Artifacts Proxy
A Juju charm that provides an nginx reverse proxy for serving static Flutter artifacts, with automatic fallback to Google's storage servers.
Overview
This charm serves as a proxy for Flutter SDK artifacts, allowing you to host specific files locally while defaulting to Google's official storage for everything else. This is particularly useful for:
- Hosting custom Flutter builds (e.g., riscv64 architecture)
- Providing local caching of Flutter artifacts
- Serving custom Flutter engine binaries
- Distributing Dart packages
Features
- Static Content Hosting: Serve any static files from the
src/static/directory - Automatic Fallback: Files not found locally are proxied to Google's storage
Usage
Adding Static Content
Place any files you want to serve in the src/static/ directory. They will be automatically served by nginx when the charm is deployed.
Example structure:
src/static/
├── index.html # Landing page
├── flutter_infra_release/ # Flutter artifacts
│ └── flutter/
│ └── ${engine_version_hash}/ # Engine version
│ ├── dart-sdk-linux-riscv64.zip
│ ├── linux-riscv64/
│ │ ├── artifacts.zip
│ │ ├── font-subset.zip
│ │ └── impeller_sdk.zip
│ └── linux-riscv64-debug/
│ └── linux-riscv64-flutter-gtk.zip
Deployment
Deploy the charm using Juju:
juju deploy flutter-artifacts-proxy
The charm will automatically:
- Install nginx
- Configure it to serve files from the static directory
- Start the nginx service
- Log all files being served
How It Works
- Static Files: Files in
src/static/are bundled with the charm - Nginx Configuration: Nginx is configured to serve from the detected path
- Fallback Proxy: Requests for files not found locally are redirected to Google's storage
Development
Building the Charm
charmcraft pack
Testing
Run the test suite:
tox
Contributing
See CONTRIBUTING.md for contribution guidelines.
Resources
License
See LICENSE file for details.
Description