Deploy: MariaDB from Gitea registry to fix amd64 manifest error

- Use image 10.0.10.205:3000/bert.hausmans/mariadb:11 in compose
- Add deploy/mariadb/Dockerfile (FROM mariadb:11, platform amd64)
- Add scripts/push-mariadb-to-registry.sh to build and push amd64 image once
- Update README with one-time push step and troubleshooting

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-02-03 14:21:00 +01:00
parent a63252135c
commit da64e52816
4 changed files with 30 additions and 8 deletions

View File

@@ -22,7 +22,7 @@ After pushing, deploy on the server: set `TAG=1.0.0` in the stack `.env`, then i
| API | 3001 | 8000 | http://10.0.10.189:3001 | | API | 3001 | 8000 | http://10.0.10.189:3001 |
| Admin | 3002 | 80 | http://10.0.10.189:3002 | | Admin | 3002 | 80 | http://10.0.10.189:3002 |
| Upload | 3003 | 80 | http://10.0.10.189:3003 | | Upload | 3003 | 80 | http://10.0.10.189:3003 |
| MySQL | 3004 | 3306 | (internal; use 3004 only for direct DB access) | | MariaDB | 3004 | 3306 | (internal; use 3004 only for direct DB access) |
## One-time setup in Dockge ## One-time setup in Dockge
@@ -37,7 +37,8 @@ After pushing, deploy on the server: set `TAG=1.0.0` in the stack `.env`, then i
- `SANCTUM_STATEFUL_DOMAINS=10.0.10.189:3002,10.0.10.189:3003` - `SANCTUM_STATEFUL_DOMAINS=10.0.10.189:3002,10.0.10.189:3003`
- Google OAuth if used: `GOOGLE_CLIENT_ID`, `GOOGLE_CLIENT_SECRET`, `GOOGLE_REDIRECT_URI` - Google OAuth if used: `GOOGLE_CLIENT_ID`, `GOOGLE_CLIENT_SECRET`, `GOOGLE_REDIRECT_URI`
3. Ensure Docker on the server has `10.0.10.205:3000` in `insecure-registries` and run `docker login 10.0.10.205:3000`. 3. Ensure Docker on the server has `10.0.10.205:3000` in `insecure-registries` and run `docker login 10.0.10.205:3000`.
4. First deploy: Pull, then Start (or `docker compose -f deploy/docker-compose.yml pull && docker compose -f deploy/docker-compose.yml up -d`). 4. **One-time:** If the server fails with "no matching manifest for linux/amd64" when pulling the database image, push the amd64 MariaDB image to Gitea from your dev machine: `./scripts/push-mariadb-to-registry.sh` (after `docker login 10.0.10.205:3000`). The stack uses this image so the server only pulls from Gitea.
5. First deploy: Pull, then Start (or `docker compose -f deploy/docker-compose.yml pull && docker compose -f deploy/docker-compose.yml up -d`).
## Deploy new version ## Deploy new version
@@ -52,6 +53,6 @@ This means the registry has no image for the tag Dockge is using.
2. **Re-push all images** From project root run `./scripts/docker-build-push.sh` again so api, admin, and upload are all pushed with the same tag. 2. **Re-push all images** From project root run `./scripts/docker-build-push.sh` again so api, admin, and upload are all pushed with the same tag.
3. **Registry login on the server** Where Dockge runs, ensure `docker login 10.0.10.205:3000` has been done and that Docker has `10.0.10.205:3000` in `insecure-registries` (if using HTTP). 3. **Registry login on the server** Where Dockge runs, ensure `docker login 10.0.10.205:3000` has been done and that Docker has `10.0.10.205:3000` in `insecure-registries` (if using HTTP).
### "no matching manifest for linux/amd64" (MySQL) ### "no matching manifest for linux/amd64" (database)
The stack pins MySQL to `docker.io/library/mysql:8.0` with `platform: linux/amd64` so the server pulls the correct image from Docker Hub. If your Dockge server is ARM (e.g. Raspberry Pi), change the MySQL service in `docker-compose.yml` to `platform: linux/arm64`. The stack uses **MariaDB 11** from your Gitea registry (`10.0.10.205:3000/bert.hausmans/mariadb:11`). If that image is missing or the server cant pull from Docker Hub, run once from your dev machine (after `docker login 10.0.10.205:3000`): `./scripts/push-mariadb-to-registry.sh`. It pulls the amd64 image from Docker Hub and pushes it to Gitea so the server only pulls from Gitea.

View File

@@ -65,17 +65,18 @@ services:
networks: networks:
- event-uploader - event-uploader
# MariaDB from Gitea (use scripts/push-mariadb-to-registry.sh once if missing)
mysql: mysql:
image: docker.io/library/mysql:8.0 image: 10.0.10.205:3000/bert.hausmans/mariadb:11
ports: ports:
- "3004:3306" - "3004:3306"
environment: environment:
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD} MARIADB_ROOT_PASSWORD: ${DB_PASSWORD}
MYSQL_DATABASE: ${DB_DATABASE:-event_uploader} MARIADB_DATABASE: ${DB_DATABASE:-event_uploader}
volumes: volumes:
- event_uploader_mysql_data:/var/lib/mysql - event_uploader_mysql_data:/var/lib/mysql
healthcheck: healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-p${DB_PASSWORD}"] test: ["CMD", "mariadb-admin", "ping", "-h", "localhost", "-p${DB_PASSWORD}"]
interval: 5s interval: 5s
timeout: 5s timeout: 5s
retries: 10 retries: 10

View File

@@ -0,0 +1,3 @@
# Pin MariaDB 11 for linux/amd64 so we can build and push to Gitea
# when the server cannot pull multi-arch from Docker Hub.
FROM --platform=linux/amd64 docker.io/library/mariadb:11

View File

@@ -0,0 +1,17 @@
#!/bin/bash
# One-time: build MariaDB for linux/amd64 and push to Gitea registry.
# Use this when the Dockge server gets "no matching manifest for linux/amd64".
# Run from project root after: docker login 10.0.10.205:3000
# Usage: ./scripts/push-mariadb-to-registry.sh
set -e
REGISTRY="${REGISTRY:-10.0.10.205:3000}"
OWNER="${OWNER:-bert.hausmans}"
TAG="11"
cd "$(dirname "$0")/.."
echo "Building MariaDB for linux/amd64..."
docker build --platform linux/amd64 --tag "$REGISTRY/$OWNER/mariadb:$TAG" --file deploy/mariadb/Dockerfile deploy/mariadb
echo "Pushing to $REGISTRY/$OWNER/mariadb:$TAG"
docker push "$REGISTRY/$OWNER/mariadb:$TAG"
echo "Done. Stack can use: $REGISTRY/$OWNER/mariadb:$TAG"