:-'Generic Commit'
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||
|
||||
@@ -8,20 +9,17 @@ SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||
# 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
|
||||
export LOCALCONFIG="${SCRIPT_DIR}/.test-docker/config.json"
|
||||
|
||||
CONFIGFILE="${SCRIPT_DIR}/.docker/config.json"
|
||||
if [ ! -f "${CONFIGFILE}" ]; then
|
||||
echo "Config file not found: ${CONFIGFILE}"
|
||||
exit 1
|
||||
fi
|
||||
COMPOSE_FILE="${SCRIPT_DIR}/.test-docker/compose.yaml"
|
||||
|
||||
docker compose -f "${COMPOSE_FILE}" up -d
|
||||
|
||||
"${SCRIPT_DIR}/test.sh" "http://localhost:7703"
|
||||
RESULT=$?
|
||||
|
||||
docker compose -f "${COMPOSE_FILE}" down
|
||||
docker compose -f "${COMPOSE_FILE}" rm -v
|
||||
|
||||
exit $RESULT
|
||||
|
||||
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
|
||||
|
Reference in New Issue
Block a user