Add multi-platform build script and prod compose for registry deployment
- build-push.sh: buildx pipeline to docker.citysensor.de - docker-compose.prod.yml: pull-only compose for nuccy (no build context) - docker-compose.yml: image tag added for local tagging Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Executable
+24
@@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
REGISTRY="docker.citysensor.de"
|
||||
IMAGE="${REGISTRY}/bodenfeuchte"
|
||||
PLATFORMS="linux/amd64"
|
||||
TAG="${1:-latest}"
|
||||
|
||||
# Ensure a buildx builder with multi-platform support exists
|
||||
if ! docker buildx inspect bodenfeuchte-builder &>/dev/null; then
|
||||
docker buildx create --name bodenfeuchte-builder --use
|
||||
else
|
||||
docker buildx use bodenfeuchte-builder
|
||||
fi
|
||||
|
||||
echo "Building and pushing ${IMAGE}:${TAG} for ${PLATFORMS} ..."
|
||||
|
||||
docker buildx build \
|
||||
--platform "${PLATFORMS}" \
|
||||
--tag "${IMAGE}:${TAG}" \
|
||||
--push \
|
||||
.
|
||||
|
||||
echo "Done: ${IMAGE}:${TAG}"
|
||||
@@ -0,0 +1,23 @@
|
||||
services:
|
||||
bodenfeuchte:
|
||||
image: docker.citysensor.de/bodenfeuchte:latest
|
||||
expose:
|
||||
- "3000"
|
||||
volumes:
|
||||
- bodenfeuchte-data:/app/data
|
||||
env_file:
|
||||
- .env
|
||||
restart: unless-stopped
|
||||
|
||||
nginx:
|
||||
image: nginx:alpine
|
||||
ports:
|
||||
- "80:80"
|
||||
volumes:
|
||||
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
|
||||
depends_on:
|
||||
- bodenfeuchte
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
bodenfeuchte-data:
|
||||
@@ -1,6 +1,7 @@
|
||||
services:
|
||||
bodenfeuchte:
|
||||
build: .
|
||||
image: docker.citysensor.de/bodenfeuchte:latest
|
||||
expose:
|
||||
- "3000"
|
||||
volumes:
|
||||
|
||||
Reference in New Issue
Block a user