fix: update CasaOS production deployment
Rust CI / Test & Quality Checks (push) Canceled after 0s
Rust CI / Build Docker Image (push) Canceled after 0s

This commit is contained in:
thakares committed 2026-08-12 19:08:06 +05:30
1 parent 8e0bcbe580
commit 763a17f8dc
3 files changed
+53 -17

No files matched your search

+1
View File
@@ -6,3 +6,4 @@ data/
.env .env
.idea/ .idea/
bzod.env
+13 -8
View File
@@ -12,8 +12,8 @@
# #
# Environment overrides: # Environment overrides:
# BZOD_VERSION=0.7.0 # BZOD_VERSION=0.7.0
# BZOD_IMAGE=ghcr.io/thakares/nx9-url-shortener # BZOD_IMAGE=nx9-url-shortener
# BZOD_ROOT=/DATA/AppData/bzod # BZOD_ROOT=/DATA/AppData/nx9-url-shortener
# BZOD_PORT=8654 # BZOD_PORT=8654
# #
@@ -24,8 +24,8 @@ set -euo pipefail
# ============================================================ # ============================================================
BZOD_VERSION="${BZOD_VERSION:-0.7.0}" BZOD_VERSION="${BZOD_VERSION:-0.7.0}"
BZOD_IMAGE="${BZOD_IMAGE:-ghcr.io/thakares/nx9-url-shortener}" BZOD_IMAGE="${BZOD_IMAGE:-nx9-url-shortener}"
BZOD_ROOT="${BZOD_ROOT:-/DATA/AppData/bzod}" BZOD_ROOT="${BZOD_ROOT:-/DATA/AppData/nx9-url-shortener}"
BZOD_PORT="${BZOD_PORT:-8654}" BZOD_PORT="${BZOD_PORT:-8654}"
CONTAINER_NAME="${CONTAINER_NAME:-bzod}" CONTAINER_NAME="${CONTAINER_NAME:-bzod}"
@@ -310,13 +310,18 @@ echo " ${BACKUP_DIR}"
# 6. Pull new image # 6. Pull new image
# ============================================================ # ============================================================
info "[6/8] Pulling BZOD ${BZOD_VERSION} image..." info "[6/8] Building BZOD ${BZOD_VERSION} image..."
if ! docker pull "${IMAGE}"; then # Build locally from the current deployment tree. The package/repository is
die "Unable to pull ${IMAGE}" # nx9-url-shortener; the application binary and container remain named bzod.
if ! docker build \
--tag "${IMAGE}" \
--file "${BZOD_ROOT}/Dockerfile" \
"${BZOD_ROOT}"; then
die "Unable to build ${IMAGE}"
fi fi
success "✓ Docker image downloaded" success "✓ Docker image built locally"
# ============================================================ # ============================================================
# 7. Deploy # 7. Deploy
+39 -9
View File
@@ -1,57 +1,87 @@
name: app-bzod name: app-bzod
services: services:
bzod: bzod:
build: build:
context: /DATA/AppData/bzod context: /DATA/AppData/nx9-url-shortener
dockerfile: Dockerfile dockerfile: Dockerfile
cpu_shares: 90
command: []
container_name: bzod container_name: bzod
deploy: deploy:
resources: resources:
limits: limits:
memory: 31940M memory: 31940M
environment: environment:
- ADMIN_PASSWORD=${ADMIN_PASSWORD}
- ADMIN_USERNAME=${ADMIN_USERNAME}
- CONFIG_DIR=/app/config
- COOKIE_SECURE=false - COOKIE_SECURE=false
- DATA_DIR=/app/data - DATA_DIR=/app/data
- ADMIN_USERNAME=${ADMIN_USERNAME}
- ADMIN_PASSWORD=${ADMIN_PASSWORD}
- HOST=0.0.0.0 - HOST=0.0.0.0
- IMAGES_DIR=/app/images
- PORT=8654 - PORT=8654
- RUST_LOG=info - RUST_LOG=info
- BASE_URL=${BASE_URL}
hostname: bzod hostname: bzod
image: nx9-url-shortener:v0.7.0 image: nx9-url-shortener:v0.7.0
ports: ports:
- mode: ingress - mode: ingress
target: 8654 target: 8654
published: "8654" published: "8654"
protocol: tcp protocol: tcp
restart: unless-stopped restart: unless-stopped
security_opt:
- no-new-privileges:true
volumes: volumes:
- type: bind - type: bind
source: /DATA/AppData/bzod/data source: /DATA/AppData/nx9-url-shortener/data
target: /app/data target: /app/data
bind: bind:
create_host_path: true create_host_path: true
- type: bind - type: bind
source: /DATA/AppData/bzod/config source: /DATA/AppData/nx9-url-shortener/config
target: /app/config target: /app/config
bind: bind:
create_host_path: true create_host_path: true
- type: bind - type: bind
source: /DATA/AppData/bzod/www source: /DATA/AppData/nx9-url-shortener/www
target: /app/www target: /app/www
bind:
create_host_path: true
- type: bind - type: bind
source: /DATA/AppData/bzod/images source: /DATA/AppData/nx9-url-shortener/images
target: /app/images target: /app/images
bind:
create_host_path: true
devices: [] devices: []
cap_add: [] cap_add: []
command: []
networks: networks:
- default - default
privileged: false privileged: false
cpu_shares: 90
networks: networks:
default: default:
name: app_default name: app_default
x-casaos: x-casaos:
author: self author: self
category: self category: self