Skip to content
This repository has been archived by the owner on May 24, 2023. It is now read-only.

Commit

Permalink
Allow to specify number of gunicorn workers
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Bašti <mbasti@redhat.com>
  • Loading branch information
MartinBasti committed Feb 28, 2019
1 parent fcea465 commit 57f83bd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ LABEL \
# The caller can optionally provide a cacert url
ARG cacert_url=undefined

ENV WORKERS_NUM 8

WORKDIR /src
RUN dnf -y install \
python3-gunicorn \
Expand All @@ -28,4 +30,4 @@ COPY . .
RUN pip3 install . --no-deps
USER 1001
EXPOSE 8080
ENTRYPOINT docker/install-ca.sh && gunicorn-3 --workers 8 --bind 0.0.0.0:8080 --access-logfile=- --enable-stdio-inheritance omps.app:app
ENTRYPOINT docker/install-ca.sh && gunicorn-3 --workers ${WORKERS_NUM} --bind 0.0.0.0:8080 --access-logfile=- --enable-stdio-inheritance omps.app:app
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ Running container with custom CA certificate
docker run --rm -p 8080:8080 -e CA_URL='http://example.com/ca-cert.crt' omps:latest
```

Running container with customized number of workers (default: 8):
```bash
docker run --rm -p 8080:8080 -e WORKERS_NUM=6 omps:latest
```


## Usage

### Uploading operators manifests from zipfile
Expand Down

0 comments on commit 57f83bd

Please sign in to comment.