Valentin Haudiquet 2dc1a39e0b Multiple changes:
- Stop ignoring static index file
- Automatically pull flutter artifacts from Launchpad
- Allow nginx to list files in directories
2026-02-10 16:23:41 +01:00
2026-02-10 16:23:41 +01:00
2026-02-06 23:52:26 +01:00
2026-02-10 16:23:41 +01:00
2026-02-06 23:52:26 +01:00
2026-02-10 16:23:41 +01:00
2026-02-06 23:52:26 +01:00
2026-02-06 23:52:26 +01:00
2026-02-06 23:52:26 +01:00
2026-02-06 23:52:26 +01:00
2026-02-06 23:52:26 +01:00
2026-02-06 23:52:26 +01:00

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:

  1. Install nginx
  2. Configure it to serve files from the static directory
  3. Start the nginx service
  4. 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
No description provided
Readme 62 KiB