GitXplorerGitXplorer
s

docker-gunicorn

public
1 stars
0 forks
0 issues

Commits

List of commits on branch main.
Unverified
ec9355409dab630f9dd8ef375f5527176a0c163e

Add compileall to example docker file

ssrittau committed 2 years ago
Unverified
5eb86678d44eb974e4dfaf64d882408354c5292e

Support Python 3.11

ssrittau committed 2 years ago
Unverified
fe9fde0ff5167926453ac55fd33427f406f0b96e

Don't install dependencies automatically

ssrittau committed 3 years ago
Unverified
c564112c4fc3a4fc251a4b5672aabc84a1133208

Fix a typo

ssrittau committed 3 years ago
Unverified
0fcd0ac69570c40194c8292bea452d94b1ffd0bd

Use --bind instead of -b

ssrittau committed 3 years ago
Unverified
90fca735bf71e487132d33ea3319b639ff3db64e

Build against Python 3.10 as well

ssrittau committed 3 years ago

README

The README file for this repository.

docker-gunicorn

A docker base container that contains Python and runs a gunicorn application server.

Configuration

The number of workers to start can be configured using the GUNICORN_WORKERS environment variable. It defaults to 4.

The gunicorn logs are written to stdout, but also stored in two files in /app/log inside the container. By default, those are named access.log and error.log, but a prefix can be configured using the LOG_PREFIX environment variable. This allows multiple containers to share a volume.

Example Dockerfile

Suppose your application lives in src/flubber and you have a package called flubber.app that contains a WSGI application with entrypoint application. The following Dockerfile will create an gunicorn image running that application:

FROM srittau/gunicorn:latest
COPY ./requirements.txt /app/requirements.txt
RUN /app/virtualenv/bin/pip --disable-pip-version-check install -q -r /app/requirements.txt
COPY ./src/flubber /app/flubber
RUN python -m compileall /app
CMD ["flubber.app"]