Commit 2836eadb authored by Guillaume Perréal's avatar Guillaume Perréal
Browse files

Ajoute un script d'exécution.

parent e71f2bfb
/node_modules
/public
/Dockerfile
/.?*
......@@ -51,10 +51,11 @@ ENV SERVER_HOST=0.0.0.0 \
OUTPUT=/public \
WKHTMLTOPDF_BINARY=/usr/local/bin/wkhtmltopdf
RUN mkdir -p -m 0777 $OUTPUT
RUN mkdir -p -m 0777 $OUTPUT \
&& ln -s /opt/prezbuilder/bin/prezbuilder /usr/local/bin/prezbuilder
WORKDIR /opt/prezbuilder
WORKDIR /src
EXPOSE 3000/tcp 35729/tcp
ENTRYPOINT ["/opt/prezbuilder/node_modules/.bin/gulp"]
ENTRYPOINT ["/usr/local/bin/prezbuilder"]
CMD ["dev"]
#!/usr/bin/env bash
set -e
usage() {
echo "Usage: $0 dev|build [src_dir [output_dir]]" >&2
exit 1
}
checkdir() {
if [[ -z $1 ]]; then
echo ""
return 0
fi
local DIR="$(readlink -f $1)"
if [[ ! -d "$DIR" ]]; then
echo "$1 is not an existing directory" >&2
usage
fi
echo "$DIR"
return 0
}
case "$1" in
dev|build) COMMAND="$1" ;;
*) usage
esac
export SRC="$(checkdir $2)"
export OUTPUT="$(checkdir $3)"
BASE="$(dirname $(readlink -f $0))/.."
exec "$BASE/node_modules/.bin/gulp" --cwd "$BASE" "$COMMAND"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment