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:
Jake Howard 2023-02-21 21:41:31 +00:00
parent 1e7ea96b63
commit d8a8e7fd8e
Signed by: jake
GPG key ID: 57AFB45680EDD477
6 changed files with 65 additions and 8 deletions

View file

@ -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