diff --git a/docker/Dockerfile b/docker/Dockerfile index 3692d4b..43c78bb 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -8,7 +8,7 @@ RUN npm install COPY . . -ARG VUE_APP_API_URL=http://127.0.0.1:5000 +ARG VUE_APP_API_URL=https://dev-api.rideaware.org ENV VUE_APP_API_URL=$VUE_APP_API_URL RUN npm run build diff --git a/scripts/build-frontend.sh b/scripts/build-frontend.sh index f3f5b71..3552f3b 100755 --- a/scripts/build-frontend.sh +++ b/scripts/build-frontend.sh @@ -13,7 +13,7 @@ IMAGE_TAG="latest" NO_CACHE=false RUN_CONTAINER=false CONTAINER_NAME="rideaware-frontend" -API_URL="http://127.0.0.1:5000" +API_URL="https://dev-api.rideaware.org" # Help function show_help() { @@ -25,7 +25,7 @@ OPTIONS: -n, --name NAME Image name (default: rideaware-frontend) -r, --run Run container after build -c, --container NAME Container name (default: rideaware-frontend) - -a, --api-url URL Backend API URL (default: http://127.0.0.1:5000) + -a, --api-url URL Backend API URL (default: https://dev-api.rideaware.org) --no-cache Build without cache -h, --help Show this help message @@ -91,7 +91,7 @@ echo -e "${YELLOW}API URL: $API_URL${NC}" echo "" if ! podman build $BUILD_ARGS -f docker/Dockerfile -t "$FULL_IMAGE" \ - --build-arg VUE_API_URL="$API_URL" .; then + --build-arg VUE_APP_API_URL="$API_URL" .; then echo -e "${RED}✗ Build failed${NC}" exit 1 fi @@ -139,7 +139,6 @@ if [ "$RUN_CONTAINER" = true ]; then if podman run -d \ --name "$CONTAINER_NAME" \ -p 3000:3000 \ - -e VUE_API_URL="$API_URL" \ "$FULL_IMAGE"; then echo -e "${GREEN}✓ Container started: $CONTAINER_NAME${NC}" sleep 2 @@ -163,7 +162,7 @@ if [ "$RUN_CONTAINER" = true ]; then fi else echo -e "${YELLOW}To run the container:${NC}" - echo " podman run -d --name $CONTAINER_NAME -p 3000:3000 -e VUE_API_URL='$API_URL' $FULL_IMAGE" + echo " podman run -d --name $CONTAINER_NAME -p 3000:3000 $FULL_IMAGE" echo "" echo -e "${YELLOW}Or use this script with --run:${NC}" echo " $0 -t $IMAGE_TAG --run -a '$API_URL'"