Bug fixing

This commit is contained in:
Your Name
2025-05-25 13:51:17 +12:00
parent 0adc14ca7e
commit 7f35bbeb01
5 changed files with 67 additions and 29 deletions

27
build-docker.sh Executable file
View File

@@ -0,0 +1,27 @@
#!/bin/bash
SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# build the executable
${SCRIPT_DIR}/build.sh amd64
# build the docker image
docker buildx build --load -t gitea.jde.nz/public/simple-object-storage:test --platform linux/amd64 .
DATADIR="/home/${USER}/.simple_object_storage"
if [ ! -d "${DATADIR}" ]; then
mkdir -p "${DATADIR}"
fi
CONFIGFILE="${SCRIPT_DIR}/.docker/config.json"
if [ ! -f "${CONFIGFILE}" ]; then
echo "Config file not found: ${CONFIGFILE}"
exit 1
fi
docker run --rm \
-p 8123:80 \
--name simple-object-storage-test \
-v ${DATADIR}:/data/storage \
-v ${CONFIGFILE}:/data/sos_config.json:ro \
gitea.jde.nz/public/simple-object-storage:test