Fix: README && Pass HUGO_URL to 'hugo serve"

This commit is contained in:
Luca 2022-12-15 23:47:04 +01:00
parent 16576bf561
commit fc3ece2d7a
3 changed files with 15 additions and 1 deletions

View File

@ -5,8 +5,12 @@ ARG HUGO_PORT
ENV HUGO_HOST "http://$HUGO_HOST:$HUGO_PORT" ENV HUGO_HOST "http://$HUGO_HOST:$HUGO_PORT"
ADD serve.sh /serve.sh
WORKDIR /app WORKDIR /app
CMD ["serve","-b","http://docker:1313"] #CMD ["serve"]
ENTRYPOINT ["/serve.sh"]
VOLUME ["/app"] VOLUME ["/app"]

View File

10
serve.sh Executable file
View File

@ -0,0 +1,10 @@
#!/bin/sh
set -xe
if [ -z $1 ]
then
hugo serve -b ${HUGO_HOST}
else
exec hugo $@
fi