more tweaking
This commit is contained in:
parent
5c3fe94375
commit
8c3be88e57
|
@ -9,7 +9,7 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
env:
|
||||
REGISTRY: ghcr.io
|
||||
IMAGE_NAME: sartography/
|
||||
IMAGE_NAME: sartography/spiffworkflow-frontend
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
FROM ghcr.io/sartography/python:3.11
|
||||
|
||||
RUN pip install poetry
|
||||
RUN useradd _gunicorn --no-create-home --user-group
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y -q \
|
||||
gcc libssl-dev \
|
||||
curl git-core libpq-dev \
|
||||
gunicorn3 default-mysql-client
|
||||
|
||||
WORKDIR /app
|
||||
COPY pyproject.toml poetry.lock /app/
|
||||
RUN poetry install --without dev
|
||||
|
||||
RUN set -xe \
|
||||
&& apt-get remove -y gcc python3-dev libssl-dev \
|
||||
&& apt-get autoremove -y \
|
||||
&& apt-get clean -y \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY . /app/
|
||||
|
||||
# run poetry install again AFTER copying the app into the image
|
||||
# otherwise it does not know what the main app module is
|
||||
RUN poetry install --without dev
|
||||
|
||||
CMD ./bin/boot_server_in_docker
|
|
@ -0,0 +1,19 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
function error_handler() {
|
||||
>&2 echo "Exited with BAD EXIT CODE '${2}' in ${0} script at line: ${1}."
|
||||
exit "$2"
|
||||
}
|
||||
trap 'error_handler ${LINENO} $?' ERR
|
||||
set -o errtrace -o errexit -o nounset -o pipefail
|
||||
|
||||
port="${CONNECTOR_PROXY_STATUS_IM_PORT:-}"
|
||||
if [[ -z "$port" ]]; then
|
||||
port=7004
|
||||
fi
|
||||
|
||||
workers=3
|
||||
|
||||
# THIS MUST BE THE LAST COMMAND!
|
||||
# default --limit-request-line is 4094. see https://stackoverflow.com/a/66688382/6090676
|
||||
exec poetry run gunicorn --bind "0.0.0.0:$port" --workers="$workers" --limit-request-line 8192 --timeout 90 --capture-output --access-logfile '-' --log-level debug app:app
|
Loading…
Reference in New Issue