Add Docker push script and registry documentation

- Create scripts/docker-push.sh for building and pushing images
- Add Docker Registry section to README with usage instructions
- Configure for Docker Hub (julienfroidefond32)
This commit is contained in:
2026-03-11 13:23:16 +01:00
parent 64347edabc
commit d2fe7f12ab
2 changed files with 115 additions and 0 deletions

View File

@@ -146,6 +146,81 @@ stripstream-librarian/
└── .env # Environment configuration
```
## Docker Registry
Images are built and pushed to Docker Hub with the naming convention `docker.io/{owner}/stripstream-{service}`.
### Publishing Images (Maintainers)
To build and push all service images to the registry:
```bash
# Login to Docker Hub first
docker login -u julienfroidefond32
# Build and push all images
./scripts/docker-push.sh
```
This script will:
- Build images for `api`, `indexer`, and `backoffice`
- Tag them with the current version (from `Cargo.toml`) and `latest`
- Push to the registry
### Using Published Images
To use the pre-built images in your own `docker-compose.yml`:
```yaml
services:
postgres:
image: postgres:16-alpine
environment:
POSTGRES_DB: stripstream
POSTGRES_USER: stripstream
POSTGRES_PASSWORD: stripstream
volumes:
- postgres_data:/var/lib/postgresql/data
meilisearch:
image: getmeili/meilisearch:v1.12
environment:
MEILI_MASTER_KEY: ${MEILI_MASTER_KEY}
api:
image: julienfroidefond32/stripstream-api:latest
env_file:
- .env
ports:
- "7080:7080"
volumes:
- ${LIBRARIES_HOST_PATH:-./libraries}:/libraries
- ${THUMBNAILS_HOST_PATH:-./data/thumbnails}:/data/thumbnails
indexer:
image: julienfroidefond32/stripstream-indexer:latest
env_file:
- .env
ports:
- "7081:7081"
volumes:
- ${LIBRARIES_HOST_PATH:-./libraries}:/libraries
- ${THUMBNAILS_HOST_PATH:-./data/thumbnails}:/data/thumbnails
backoffice:
image: julienfroidefond32/stripstream-backoffice:latest
env_file:
- .env
environment:
- PORT=7082
- HOST=0.0.0.0
ports:
- "7082:7082"
volumes:
postgres_data:
```
## License
[Your License Here]

40
scripts/docker-push.sh Executable file
View File

@@ -0,0 +1,40 @@
#!/bin/bash
set -e
# Docker Hub
REGISTRY="docker.io"
OWNER="julienfroidefond32"
VERSION=$(grep '^version = ' Cargo.toml | head -1 | sed 's/version = "\(.*\)"/\1/')
SERVICES=("api" "indexer" "backoffice")
echo "=== Stripstream Librarian Docker Push ==="
echo "Registry: $REGISTRY"
echo "Version: $VERSION"
echo "Services: ${SERVICES[@]}"
echo ""
for service in "${SERVICES[@]}"; do
echo "Building $service..."
docker build -f apps/$service/Dockerfile -t $service:latest .
echo "Tagging $service..."
docker tag $service:latest $REGISTRY/$OWNER/stripstream-$service:$VERSION
docker tag $service:latest $REGISTRY/$OWNER/stripstream-$service:latest
echo "Pushing stripstream-$service:$VERSION..."
docker push $REGISTRY/$OWNER/stripstream-$service:$VERSION
echo "Pushing stripstream-$service:latest..."
docker push $REGISTRY/$OWNER/stripstream-$service:latest
echo "$service pushed successfully"
echo ""
done
echo "=== All images pushed to $REGISTRY ==="
echo "Images:"
for service in "${SERVICES[@]}"; do
echo " - $REGISTRY/$OWNER/stripstream-$service:$VERSION"
echo " - $REGISTRY/$OWNER/stripstream-$service:latest"
done