Skip to content

Commit

Permalink
Merge pull request s3gw-tech#275 from jecluis/wip-fix-makefile
Browse files Browse the repository at this point in the history
Makefile: make running backend more resilient
  • Loading branch information
jecluis authored Oct 22, 2023
2 parents a99098f + 38cb180 commit 492603d
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

.PHONY: check-ui-backend-env

########################################################################
# Testing cluster

Expand All @@ -34,15 +36,15 @@ setup-ui-backend:
########################################################################
# Build UI components

build-ui-fronted:
build-ui-frontend:
cd src/frontend && npm ci && npx ng build

########################################################################
# Build UI Image

#Kept for convenience until the new backend architecture is not ready.
#This will be likely removed in the future.
image-build-ui-fronted:
image-build-ui-frontend:
docker build -t s3gw-frontend:latest -f src/frontend/Dockerfile src/frontend

image-build-ui:
Expand All @@ -51,9 +53,8 @@ image-build-ui:
########################################################################
# Run UI components

run-ui-backend:
run-ui-backend: check-ui-backend-env setup-ui-backend build-ui-frontend
cd src \
&& python3 -m venv venv \
&& source venv/bin/activate \
&& S3GW_DEBUG=1 python3 ./s3gw_ui_backend.py

Expand Down Expand Up @@ -95,3 +96,12 @@ test-ui-backend:

test-ui-backend-with-s3gw:
@./test-env/run-tests.sh

# Check whether we have a valid S3GW_SERVICE_URL environment variable
#
check-ui-backend-env:
ifndef S3GW_SERVICE_URL
$(error S3GW_SERVICE_URL must be set.)
endif


0 comments on commit 492603d

Please sign in to comment.