Convox base image for Django
FROM convox/django
# copy only the files needed for pip install
COPY requirements.txt /app/requirements.txt
RUN pip3 install --upgrade pip
RUN pip3 install -r requirements.txt
# copy only the files needed for collectstatic
COPY exampleapp/static /app/exampleapp/static
COPY exampleproject /app/exampleproject
COPY manage.py /app/manage.py
RUN python3 manage.py collectstatic --noinput
# copy the rest of the app
COPY . /app
Applications using this image should:
/app8000.PROJECT to the django project name so gunicorn can find the WSGI callable4000 and redirect all requests to https://.4001 accepting PROXY protocol and injecting X-Forwarded-For headers.When using this image, your docker-compose.yml should include the following:
labels:
- convox.port.443.protocol=tls
- convox.port.443.proxy=true
ports:
- 80:4000
- 443:4001
libmysqld-devlibpq-devlibsqlite3-devpython3-devX-Forwarded-Proto and X-Forwarded-For/static from disk without hitting the Django appContent type
Image
Digest
Size
234.4 MB
Last updated
about 10 years ago
docker pull convox/django