feat: Add Docker Registry push script and NAS compose file
This commit is contained in:
parent
63ad7cc21f
commit
babebc6b82
2 changed files with 43 additions and 0 deletions
18
docker-compose.nas.yml
Normal file
18
docker-compose.nas.yml
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
version: '3.8'
|
||||
|
||||
services:
|
||||
app:
|
||||
image: git.khoavo.myds.me/vndangkhoa/apix:latest
|
||||
container_name: apix_container
|
||||
ports:
|
||||
- "8558:8888"
|
||||
volumes:
|
||||
- ./static:/app/static
|
||||
- ./prompts.json:/app/prompts.json
|
||||
- ./user_prompts.json:/app/user_prompts.json
|
||||
- ./gallery_favorites.json:/app/gallery_favorites.json
|
||||
environment:
|
||||
- GOOGLE_API_KEY=${GOOGLE_API_KEY:-}
|
||||
- WHISK_COOKIES=${WHISK_COOKIES:-}
|
||||
restart: unless-stopped
|
||||
pull_policy: always
|
||||
25
push_registry.sh
Executable file
25
push_registry.sh
Executable file
|
|
@ -0,0 +1,25 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Configuration
|
||||
REGISTRY="git.khoavo.myds.me"
|
||||
IMAGE_NAME="vndangkhoa/apix"
|
||||
TAG="latest"
|
||||
FULL_IMAGE="$REGISTRY/$IMAGE_NAME:$TAG"
|
||||
|
||||
echo "=== Building Docker Image for Linux/AMD64 ==="
|
||||
# We use --platform linux/amd64 because your NAS is likely amd64
|
||||
docker build --platform linux/amd64 -t "$FULL_IMAGE" .
|
||||
|
||||
echo ""
|
||||
echo "=== Logging in to Registry ($REGISTRY) ==="
|
||||
echo "If prompted, enter your Forgejo Credentials"
|
||||
docker login "$REGISTRY"
|
||||
|
||||
echo ""
|
||||
echo "=== Pushing Image to Registry ==="
|
||||
docker push "$FULL_IMAGE"
|
||||
|
||||
echo ""
|
||||
echo "=== Done! ==="
|
||||
echo "Image pushed to: $FULL_IMAGE"
|
||||
echo "You can now use docker-compose.nas.yml on your Synology."
|
||||
Loading…
Reference in a new issue