Skip to content

Commit

Permalink
improvements to the target code
Browse files Browse the repository at this point in the history
  • Loading branch information
compgeniuses committed Jul 12, 2024
1 parent 33490e7 commit ea36b8e
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions imageroot/bin/create-user
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,24 @@ set -o allexport; source app.env; set +o allexport;
echo "Waiting for software to be ready ..."
sleep 120s;

target=$(podman port traefik 80)

target=$(docker-compose port nginx 80)
# Extract the host and port from the output
host=$(echo $target | cut -d ':' -f 1)
port=$(echo $target | cut -d ':' -f 2)

# Check if the host is determined
if [ -z "$host" ]; then
echo "Host not found, exiting."
exit 1
fi

curl http://${target}/api/auth/register \
# Construct the URL
# Assuming the service is available at /api/auth/register via Traefik
url="http://${host}:${port}/api/auth/register"

# Execute the curl command
curl url \
-H 'accept: application/json, text/plain, */*' \
-H 'accept-language: fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.7,he;q=0.6' \
-H 'cache-control: no-cache' \
Expand Down

0 comments on commit ea36b8e

Please sign in to comment.