Skip to content

Commit

Permalink
only mount on macos
Browse files Browse the repository at this point in the history
  • Loading branch information
fffonion committed Dec 5, 2023
1 parent 147c51c commit 1cbf26c
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 1 deletion.
6 changes: 6 additions & 0 deletions assets/docker-compose-linux-extend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: '3.5'

services:
kong:
volumes:
- ${PONGO_WD}/servroot:/kong-prefix
6 changes: 6 additions & 0 deletions assets/docker-compose-nonlinux-extend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: '3.5'

services:
kong:
volumes:
- ${PONGO_WD}/servroot/logs:/kong-prefix/logs
1 change: 0 additions & 1 deletion assets/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -170,4 +170,3 @@ services:
- ${SERVICE_NETWORK_NAME}-kong.${SERVICE_NETWORK_NAME}
volumes:
- ${PONGO_WD}:/kong-plugin
- ${PONGO_WD}/servroot/logs:/kong-prefix/logs
12 changes: 12 additions & 0 deletions pongo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,18 @@ function globals {

DOCKER_FILE=${PONGO_DOCKER_FILE:-$LOCAL_PATH/assets/Dockerfile}
DOCKER_COMPOSE_FILES="-f ${LOCAL_PATH}/assets/docker-compose.yml"
# macOS or WSL working on a drvfs mount doesn't support named pipes/UDS
if [ "$(uname -s)" == "Darwin" ] || ! mkfifo .pongo_test.sock 2>/dev/null; then
warn "Current directory doesn't support UDS, thus only logs are exposed onto host."
warn "To view other files under servroot, exec into the pongo container and inspect"
warn "\$KONG_PREFIX directory"

rm -f .pongo_test.sock
DOCKER_COMPOSE_FILES="$DOCKER_COMPOSE_FILES -f ${LOCAL_PATH}/assets/docker-compose-nonlinux.yml"
else
DOCKER_COMPOSE_FILES="$DOCKER_COMPOSE_FILES -f ${LOCAL_PATH}/assets/docker-compose-linux.yml"
fi

IMAGE_BASE_NAME=kong-pongo-test

# the path where the plugin source is located, as seen from Pongo (this script)
Expand Down

0 comments on commit 1cbf26c

Please sign in to comment.