craft

command module
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 2, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

README

Go Report Card example workflow example workflow coverage

Craft

Craft is a simple tool for running and managing Bedrock servers.

It's a docker API wrapper which runs a specific container with bedrock installed.

Windows and Linux (tested on Ubuntu 20) are supported.

Examples
# Start a new server with default settings
craft run myserver

# Stop the server and store a backup
craft stop myserver

# Start the server again from the latest backup
craft start myserver

# Create a new backup without interrupting gameplay
craft backup myserver

# View live server log output
craft logs myserver

# List running servers
craft list

# List running and stopped servers
craft list -a

# Run normal server commands
craft cmd myserver time set 0600
Linux automated backup

This shell script (backup.sh) will save the servers myserver1 and myserver2 and log to ~/backup.log. Log rotation is built in and --trim 3 keeps only the 3 most recent backups, removing all others.

#!/usr/bin/env bash
~/go/bin/craft backup myserver1 myserver2 --skip-trim-file-removal-check --trim 3 --log ~/backup.log --log-level info

The following cron job runs it once per hour.

0 * * * * ~/backup.sh

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL