-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
30 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,20 @@ | ||
# Note: the Django and psycopg2 versions are repeated in requirements.txt for the benefit | ||
# of the analysis container. The base container and requirements file versions should be kept | ||
# in sync. | ||
FROM quay.io/azavea/django:3.2-python3.10-slim | ||
|
||
MAINTAINER Azavea | ||
FROM python:3.10-slim-bullseye | ||
|
||
WORKDIR /usr/src | ||
COPY requirements.txt /tmp/ | ||
|
||
ARG buildDeps=" build-essential libpq-dev" | ||
ARG deps=" gdal-bin libgdal-dev gettext postgresql-client" | ||
|
||
RUN apt-get update && apt-get install -y $buildDeps $deps --no-install-recommends | ||
RUN pip3 install --no-cache-dir -r /tmp/requirements.txt | ||
RUN apt-get purge -y --auto-remove $buildDeps | ||
|
||
COPY . /usr/src | ||
WORKDIR /usr/src | ||
|
||
EXPOSE 9202 | ||
|
||
CMD ["-w", "1", \ | ||
"-b", "0.0.0.0:9202", \ | ||
"--reload", \ | ||
"--log-level", "info", \ | ||
"--error-logfile", "-", \ | ||
"--forwarded-allow-ips", "*", \ | ||
"-k", "gevent", \ | ||
"pfb_network_connectivity.wsgi"] | ||
ENTRYPOINT ["/usr/local/bin/gunicorn"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import os | ||
|
||
bind = ":9202" | ||
accesslog = "-" | ||
errorlog = "-" | ||
workers = 3 | ||
loglevel = "Info" | ||
|
||
ENVIRONMENT = os.getenv("DJANGO_ENV", "dev") | ||
|
||
if ENVIRONMENT == "dev": | ||
reload = True | ||
else: | ||
preload = True | ||
|
||
wsgi_app = "pfb_network_connectivity.wsgi" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters