Files
bracket/backend/Dockerfile
Erik Vroon bac67f9e67 Fix healthcheck commands (#1151)
ref https://github.com/evroon/bracket/issues/1150

the backend healthcheck on localhost doesn't work, needs to be
`0.0.0.0`:

```
/app $ wget --spider http://localhost:8400/ping
Connecting to localhost:8400 ([::1]:8400)
wget: can't connect to remote host: Connection refused
```
2025-03-12 08:47:34 +01:00

29 lines
710 B
Docker

FROM python:3.12-alpine3.17
ARG packages
RUN apk --update add ${packages} \
&& rm -rf /var/cache/apk/* \
&& pip3 install --upgrade pip pipenv wheel virtualenv
COPY . /app
WORKDIR /app
# -- Install dependencies:
RUN addgroup --system bracket && adduser --system bracket --ingroup bracket \
&& chown -R bracket:bracket /app
USER bracket
RUN set -ex \
&& pip3 install --upgrade pip pipenv wheel virtualenv \
&& pipenv install --deploy
EXPOSE 8400
HEALTHCHECK --interval=10s --timeout=5s --retries=5 \
CMD wget --spider http://0.0.0.0:8400/ping || exit 1
CMD pipenv run gunicorn \
-k uvicorn.workers.UvicornWorker \
bracket.app:app \
--bind 0.0.0.0:8400 \
--workers 1