Files
simple-object-server/test-docker.sh
2025-05-29 18:37:41 +12:00

26 lines
590 B
Bash
Executable File

#!/bin/bash
set -euo pipefail
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 .
export LOCALCONFIG="${SCRIPT_DIR}/.test-docker/config.json"
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