mirror of
https://github.com/sartography/spiffworkflow-frontend.git
synced 2025-02-24 12:18:17 +00:00
npm ci is safer than npm i, and avoid installing serve globally
This commit is contained in:
parent
965fa2871e
commit
09fe6b4054
@ -5,8 +5,6 @@ WORKDIR /app
|
|||||||
ADD package.json /app/
|
ADD package.json /app/
|
||||||
ADD package-lock.json /app/
|
ADD package-lock.json /app/
|
||||||
COPY . /app/
|
COPY . /app/
|
||||||
RUN npm install && \
|
RUN npm ci && npm run build
|
||||||
npm run build
|
|
||||||
|
|
||||||
RUN npm install -g serve
|
|
||||||
ENTRYPOINT ["/app/bin/boot_server_in_docker"]
|
ENTRYPOINT ["/app/bin/boot_server_in_docker"]
|
||||||
|
@ -7,31 +7,4 @@ function error_handler() {
|
|||||||
trap 'error_handler ${LINENO} $?' ERR
|
trap 'error_handler ${LINENO} $?' ERR
|
||||||
set -o errtrace -o errexit -o nounset -o pipefail
|
set -o errtrace -o errexit -o nounset -o pipefail
|
||||||
|
|
||||||
# # run migrations
|
exec ./node_modules/.bin/serve -s build -l "$PORT0"
|
||||||
# export FLASK_APP=/app/src/spiffworkflow_backend
|
|
||||||
#
|
|
||||||
# if [ "${DOWNGRADE_DB:-}" = "true" ]; then
|
|
||||||
# echo 'Downgrading database...'
|
|
||||||
# poetry run flask db downgrade
|
|
||||||
# fi
|
|
||||||
#
|
|
||||||
# if [ "${UPGRADE_DB:-}" = "true" ]; then
|
|
||||||
# echo 'Upgrading database...'
|
|
||||||
# poetry run flask db upgrade
|
|
||||||
# fi
|
|
||||||
#
|
|
||||||
# port="${PORT0:-}"
|
|
||||||
# if [[ -z "$port" ]]; then
|
|
||||||
# port=7000
|
|
||||||
# fi
|
|
||||||
#
|
|
||||||
# additional_args=""
|
|
||||||
#
|
|
||||||
# if [[ "${APPLICATION_ROOT:-}" != "/" ]]; then
|
|
||||||
# additional_args="${additional_args} -e SCRIPT_NAME=${APPLICATION_ROOT}"
|
|
||||||
# fi
|
|
||||||
#
|
|
||||||
# # THIS MUST BE THE LAST COMMAND!
|
|
||||||
# exec poetry run gunicorn ${additional_args} --bind "0.0.0.0:$PORT0" --workers=3 --timeout 90 --log-level debug wsgi:app
|
|
||||||
|
|
||||||
exec serve -s build -l "$PORT0"
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user