|
| 1 | +# Satis |
| 2 | + |
| 3 | +Self-hosted Composer repository (Satis) with Nginx, Auth-Proxy and Webhook support. |
| 4 | + |
| 5 | +## Project Structure |
| 6 | + |
| 7 | +``` |
| 8 | +. |
| 9 | +├── src/ # Docker image source files |
| 10 | +│ ├── Dockerfile |
| 11 | +│ ├── nginx.conf |
| 12 | +│ ├── default.conf |
| 13 | +│ ├── webhook.py |
| 14 | +│ └── start.sh |
| 15 | +├── satis/ # Helm chart |
| 16 | +│ ├── Chart.yaml |
| 17 | +│ ├── values.yaml |
| 18 | +│ └── templates/ |
| 19 | +├── README.md # This file |
| 20 | +└── helmfile.yaml.example # Helmfile example |
| 21 | +``` |
| 22 | + |
| 23 | +## Docker Image |
| 24 | + |
| 25 | +The Docker image is built from files in the `src/` directory and automatically published to GitHub Container Registry on push. |
| 26 | + |
| 27 | +## Helm Chart Installation |
| 28 | + |
| 29 | +### Prerequisites |
| 30 | + |
| 31 | +- Kubernetes cluster (1.19+) |
| 32 | +- Helm 3.8+ (for OCI registry support) |
| 33 | +- Access to GitHub Container Registry (ghcr.io) |
| 34 | + |
| 35 | +### Add Helm Registry (optional) |
| 36 | + |
| 37 | +If using a private repository, authenticate with GitHub Container Registry: |
| 38 | + |
| 39 | +```bash |
| 40 | +helm registry login ghcr.io -u YOUR_GITHUB_USERNAME |
| 41 | +``` |
| 42 | + |
| 43 | +### Install from OCI Registry |
| 44 | + |
| 45 | +```bash |
| 46 | +helm install my-satis oci://ghcr.io/splintnet/satis/satis --version 0.1.0 |
| 47 | +``` |
| 48 | + |
| 49 | +### Install with Custom Values |
| 50 | + |
| 51 | +```bash |
| 52 | +helm install my-satis oci://ghcr.io/splintnet/satis/satis \ |
| 53 | + --version 0.1.0 \ |
| 54 | + -f values.yaml |
| 55 | +``` |
| 56 | + |
| 57 | +### Upgrade |
| 58 | + |
| 59 | +```bash |
| 60 | +helm upgrade my-satis oci://ghcr.io/splintnet/satis/satis --version 0.2.0 |
| 61 | +``` |
| 62 | + |
| 63 | +## Configuration |
| 64 | + |
| 65 | +### Required Values |
| 66 | + |
| 67 | +At minimum, configure the Docker image and Satis configuration: |
| 68 | + |
| 69 | +```yaml |
| 70 | +image: |
| 71 | + repository: ghcr.io/splintnet/satis/satis |
| 72 | + tag: "latest" |
| 73 | + |
| 74 | +satis: |
| 75 | + configJson: | |
| 76 | + { |
| 77 | + "name": "my/composer-repository", |
| 78 | + "description": "My Composer Repository", |
| 79 | + "homepage": "https://repo.example.com", |
| 80 | + "repositories": [ |
| 81 | + { "type": "vcs", "url": "https://github.com/myorg/myrepo.git" } |
| 82 | + ], |
| 83 | + "require-all": true |
| 84 | + } |
| 85 | +``` |
| 86 | +
|
| 87 | +### Authentication (Optional) |
| 88 | +
|
| 89 | +To protect packages with authentication: |
| 90 | +
|
| 91 | +```yaml |
| 92 | +ingress: |
| 93 | + enabled: true |
| 94 | + authUrl: "https://auth.example.com" # Base URL (without /api/auth) |
| 95 | + hosts: |
| 96 | + - host: repo.example.com |
| 97 | + paths: |
| 98 | + - path: / |
| 99 | + pathType: Prefix |
| 100 | + tls: |
| 101 | + - secretName: repo-tls |
| 102 | + hosts: |
| 103 | + - repo.example.com |
| 104 | +``` |
| 105 | +
|
| 106 | +### Webhook (Optional) |
| 107 | +
|
| 108 | +Enable webhook for manual rebuild triggers: |
| 109 | +
|
| 110 | +```yaml |
| 111 | +webhook: |
| 112 | + enabled: true |
| 113 | + authSecret: "your-secret-here" # MUST be set if enabled |
| 114 | + rebuildCommand: "/satis/bin/satis build /build/config/satis.json /build/output" |
| 115 | +``` |
| 116 | +
|
| 117 | +### GitHub OAuth (Optional) |
| 118 | +
|
| 119 | +For private repositories: |
| 120 | +
|
| 121 | +```yaml |
| 122 | +github: |
| 123 | + oauth: |
| 124 | + enabled: true |
| 125 | + token: "ghp_YOUR_TOKEN_HERE" |
| 126 | +``` |
| 127 | +
|
| 128 | +### Persistence |
| 129 | +
|
| 130 | +Persistent storage for Satis output: |
| 131 | +
|
| 132 | +```yaml |
| 133 | +persistence: |
| 134 | + enabled: true |
| 135 | + size: 2Gi |
| 136 | + storageClass: "" # Use default storage class |
| 137 | +``` |
| 138 | +
|
| 139 | +## Complete Example |
| 140 | +
|
| 141 | +See `helmfile.yaml.example` for a complete configuration example. |
| 142 | + |
| 143 | +## Values Reference |
| 144 | + |
| 145 | +| Parameter | Description | Default | |
| 146 | +| --------------------------- | -------------------------------- | ------------------------------- | |
| 147 | +| `image.repository` | Docker image repository | `ghcr.io/splintnet/satis/satis` | |
| 148 | +| `image.tag` | Docker image tag | `latest` | |
| 149 | +| `satis.configPath` | Path to Satis config.json | `/build/config/satis.json` | |
| 150 | +| `satis.outputPath` | Path for Satis output | `/build/output` | |
| 151 | +| `satis.forceBuildOnStartup` | Force build on container startup | `true` | |
| 152 | +| `satis.configJson` | Satis configuration JSON | See values.yaml | |
| 153 | +| `ingress.enabled` | Enable ingress | `false` | |
| 154 | +| `ingress.authUrl` | Auth API base URL | `""` | |
| 155 | +| `webhook.enabled` | Enable webhook service | `false` | |
| 156 | +| `webhook.authSecret` | Webhook auth secret | `CHANGE_ME` | |
| 157 | +| `persistence.enabled` | Enable persistent storage | `true` | |
| 158 | +| `persistence.size` | Storage size | `2Gi` | |
| 159 | + |
| 160 | +## Uninstall |
| 161 | + |
| 162 | +```bash |
| 163 | +helm uninstall my-satis |
| 164 | +``` |
| 165 | + |
| 166 | +## Troubleshooting |
| 167 | + |
| 168 | +### Check Pod Status |
| 169 | + |
| 170 | +```bash |
| 171 | +kubectl get pods -l app.kubernetes.io/name=satis |
| 172 | +``` |
| 173 | + |
| 174 | +### View Logs |
| 175 | + |
| 176 | +```bash |
| 177 | +kubectl logs -l app.kubernetes.io/name=satis |
| 178 | +``` |
| 179 | + |
| 180 | +### Check ConfigMap |
| 181 | + |
| 182 | +```bash |
| 183 | +kubectl get configmap my-satis-config -o yaml |
| 184 | +``` |
| 185 | + |
| 186 | +### Test Webhook |
| 187 | + |
| 188 | +```bash |
| 189 | +curl -X POST https://repo.example.com/webhook \ |
| 190 | + -H "X-Satis-Auth-Secret: your-secret" |
| 191 | +``` |
| 192 | + |
| 193 | +## License |
| 194 | + |
| 195 | +See LICENSE file in the repository. |
0 commit comments