Skip to content

Commit

Permalink
Use same port for Hugo and Docker, allow override via $PORT
Browse files Browse the repository at this point in the history
  • Loading branch information
rimas-kudelis committed Jan 27, 2024
1 parent 793a001 commit 2c6b401
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions run-dev-server.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
#/bin/sh
# Runs Hugo server, accessible at http://localhost (port 80)
docker run -p 127.0.0.1:80:1313 -u $(id -u):$(id -g) -v ${PWD}:/src hugomods/hugo:exts hugo server --bind 0.0.0.0
#!/bin/sh

if [ -z "$PORT" ]; then
PORT=80
fi

# Runs Hugo server, accessible at http://localhost:$PORT (default to port 80)
docker run -p 127.0.0.1:${PORT}:${PORT} -u $(id -u):$(id -g) -v ${PWD}:/src hugomods/hugo:exts hugo server --bind 0.0.0.0 --port ${PORT}

0 comments on commit 2c6b401

Please sign in to comment.