File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change 11HOMEPAGE_CONTAINER ?= quay.io/hybridcloudpatterns/homepage-container:latest
2+ UNAME =$(shell uname -s)
23
3- PODMAN_OPTS ?= -it --security-opt label=disable --pull=newer --net=host
4-
4+ # Can't use host networks on MacOS as it's a VM anyway.
5+ # Also because of the proxy 127.0.0.1 doesn't work as a bind address.
6+ ifeq ($(UNAME ) , Darwin)
7+ PODMAN_OPTS ?= -it --security-opt label=disable --pull=newer -p 4000:4000
8+ HUGO_SERVER_OPTS = --bind 0.0.0.0
9+ else
10+ PODMAN_OPTS ?= -it --security-opt label=disable --pull=newer --net=host
11+ endif
512# Do not use selinux labeling when we are using nfs
613FSTYPE =$(shell df -Th . | grep -v Type | awk '{ print $$2 }')
14+
715ifeq ($(FSTYPE ) , nfs)
816 ATTRS = "rw"
917else ifeq ($(FSTYPE), nfs4)
1018 ATTRS = "rw"
19+ else ifeq ($(UNAME), Darwin)
20+ ATTRS = "rw"
1121else
1222 ATTRS = "rw,z"
1323endif
@@ -30,7 +40,7 @@ build: ## Build the website locally in the public/ folder
3040.PHONY : serve
3141serve : # # Build the website locally from a container and serve it
3242 @echo " Serving via container. Browse to http://localhost:4000"
33- podman run $(PODMAN_OPTS ) -v $(PWD ) :/site:$(ATTRS ) --entrypoint hugo $(HOMEPAGE_CONTAINER ) server -p 4000
43+ podman run $(PODMAN_OPTS ) -v $(PWD ) :/site:$(ATTRS ) --entrypoint hugo $(HOMEPAGE_CONTAINER ) server -p 4000 $( HUGO_SERVER_OPTS )
3444
3545.PHONY : htmltest
3646htmltest : build # # Runs htmltest against the site to find broken links
You can’t perform that action at this time.
0 commit comments