Skip to content

Commit

Permalink
preserve behaviour on linux
Browse files Browse the repository at this point in the history
  • Loading branch information
fffonion committed Dec 5, 2023
1 parent 7e037d5 commit 29b91ef
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 or Unix Domain Socket
if [ "$(uname -s)" == "Darwin" ] || ! (rm -f .pongo_test.sock; mkfifo .pongo_test.sock) 2>/dev/null; then
warn "Current directory doesn't support nix Domain Socket, thus only logs are"
warn "exposed onto host. To view other files under servroot, exec into the"
warn "pongo container and inspect \$KONG_PREFIX directory"

rm -f .pongo_test.sock
DOCKER_COMPOSE_FILES="$DOCKER_COMPOSE_FILES -f ${LOCAL_PATH}/assets/docker-compose-nonlinux-extend.yml"
else
DOCKER_COMPOSE_FILES="$DOCKER_COMPOSE_FILES -f ${LOCAL_PATH}/assets/docker-compose-linux-extend.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 29b91ef

Please sign in to comment.