Update 34 files
All checks were successful
Test and Publish Templates / test-and-publish (push) Successful in 9s

This commit is contained in:
j
2026-02-27 10:17:38 +13:00
parent 266b90e281
commit e1e711fc9c
34 changed files with 45 additions and 45 deletions

View File

@@ -15,7 +15,7 @@ echo "Dumping PostgreSQL database..."
docker exec ${CONTAINER_NAME}_db pg_dump -U "$DB_USER" "$DB_NAME" > "${DATA_PATH}/database.sql" || _die "Failed to dump database"
# Stop containers for consistent backup
docker compose stop
docker compose -p "${CONTAINER_NAME}" stop
# Backup using dropshell's backup system
# shellcheck disable=SC2046
@@ -25,6 +25,6 @@ backup_items $(get_wikijs_volumes) || _die "Failed to create backup"
rm -f "${DATA_PATH}/database.sql"
# Restart containers
docker compose start
docker compose -p "${CONTAINER_NAME}" start
echo "Backup created successfully"

View File

@@ -12,7 +12,7 @@ echo "This includes all wiki pages, users, database, and configuration!"
cd "$SCRIPT_DIR" || _die "Failed to change to script directory"
# Stop and remove containers
docker compose down -v 2>/dev/null || true
docker compose -p "${CONTAINER_NAME}" down -v 2>/dev/null || true
# Remove data directory
rm -rf "${DATA_PATH}"

View File

@@ -30,13 +30,13 @@ export CONTAINER_NAME DATA_PATH HTTP_PORT PUID PGID TZ IMAGE_TAG DB_NAME DB_USER
cd "$SCRIPT_DIR" || _die "Failed to change to script directory"
# Pull images
docker compose pull || _die "Failed to pull images"
docker compose -p "${CONTAINER_NAME}" pull || _die "Failed to pull images"
# Stop existing containers
docker compose down 2>/dev/null || true
docker compose -p "${CONTAINER_NAME}" down 2>/dev/null || true
# Start containers (--build ensures fresh state)
docker compose up -d --build || _die "Failed to start containers"
docker compose -p "${CONTAINER_NAME}" up -d --build || _die "Failed to start containers"
echo "Installation of ${CONTAINER_NAME} complete"
echo "Access Wiki.js at http://localhost:${HTTP_PORT}"

View File

@@ -10,5 +10,5 @@ cd "$SCRIPT_DIR" || _die "Failed to change to script directory"
echo "Container ${CONTAINER_NAME} logs:"
_grey_start
docker compose logs "$@"
docker compose -p "${CONTAINER_NAME}" logs "$@"
_grey_end

View File

@@ -11,14 +11,14 @@ export CONTAINER_NAME DATA_PATH HTTP_PORT PUID PGID TZ IMAGE_TAG DB_NAME DB_USER
cd "$SCRIPT_DIR" || _die "Failed to change to script directory"
# Stop and remove containers before restore
docker compose down
docker compose -p "${CONTAINER_NAME}" down
# Restore files using dropshell's restore system
# shellcheck disable=SC2046
restore_items $(get_wikijs_volumes) || _die "Failed to restore data from backup file"
# Start database container only
docker compose up -d db
docker compose -p "${CONTAINER_NAME}" up -d db
echo "Waiting for database to be ready..."
sleep 5
@@ -38,6 +38,6 @@ else
fi
# Start all containers
docker compose up -d
docker compose -p "${CONTAINER_NAME}" up -d
echo "Restore complete! Service is running."

View File

@@ -7,7 +7,7 @@ _check_required_env_vars "CONTAINER_NAME" "DATA_PATH"
export CONTAINER_NAME DATA_PATH HTTP_PORT PUID PGID TZ IMAGE_TAG DB_NAME DB_USER DB_PASS
cd "$SCRIPT_DIR" || _die "Failed to change to script directory"
docker compose up -d || _die "Failed to start containers"
docker compose -p "${CONTAINER_NAME}" up -d || _die "Failed to start containers"
echo "Container ${CONTAINER_NAME} started"
echo "Access Wiki.js at http://localhost:${HTTP_PORT}"

View File

@@ -7,6 +7,6 @@ _check_required_env_vars "CONTAINER_NAME"
export CONTAINER_NAME DATA_PATH HTTP_PORT PUID PGID TZ IMAGE_TAG DB_NAME DB_USER DB_PASS
cd "$SCRIPT_DIR" || _die "Failed to change to script directory"
docker compose stop || _die "Failed to stop containers"
docker compose -p "${CONTAINER_NAME}" stop || _die "Failed to stop containers"
echo "Container ${CONTAINER_NAME} stopped"

View File

@@ -9,10 +9,10 @@ export CONTAINER_NAME DATA_PATH HTTP_PORT PUID PGID TZ IMAGE_TAG DB_NAME DB_USER
cd "$SCRIPT_DIR" || _die "Failed to change to script directory"
# Stop and remove containers (but preserve volumes/data)
docker compose down || _die "Failed to stop containers"
docker compose -p "${CONTAINER_NAME}" down || _die "Failed to stop containers"
# Remove images
docker compose config --images | xargs -r docker rmi 2>/dev/null || true
docker compose -p "${CONTAINER_NAME}" config --images | xargs -r docker rmi 2>/dev/null || true
echo "Uninstallation of ${CONTAINER_NAME} complete."
echo "Data preserved in ${DATA_PATH}. To remove all data, use destroy.sh"