Use nginx to serve static files
This should keep easy requests out the app event loop, hopefully improving response time
This commit is contained in:
parent
1e7ea96b63
commit
d8a8e7fd8e
6 changed files with 65 additions and 8 deletions
|
@ -22,6 +22,7 @@ RUN apt-get update --yes --quiet && apt-get install --yes --quiet --no-install-r
|
|||
libpq-dev \
|
||||
curl \
|
||||
git \
|
||||
nginx \
|
||||
# wand dependencies
|
||||
libmagickwand-6.q16-6 libmagickwand-6.q16hdri-6 \
|
||||
&& apt-get autoremove && rm -rf /var/lib/apt/lists/*
|
||||
|
@ -33,6 +34,8 @@ ENV PATH=$VIRTUAL_ENV/bin:$PATH \
|
|||
|
||||
EXPOSE 8000
|
||||
|
||||
RUN ln -fs /app/etc/nginx.conf /etc/nginx/sites-available/default
|
||||
|
||||
USER website
|
||||
|
||||
RUN python -m venv $VIRTUAL_ENV
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue