Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hexylena/docker-django
https://github.com/hexylena/docker-django
Last synced: 16 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/hexylena/docker-django
- Owner: hexylena
- Created: 2017-05-21T03:59:22.000Z (over 7 years ago)
- Default Branch: 2.7
- Last Pushed: 2018-05-11T10:15:54.000Z (over 6 years ago)
- Last Synced: 2024-10-17T13:58:20.972Z (about 1 month ago)
- Language: Nginx
- Size: 23.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Django Docker File [![Docker Repository on Quay](https://quay.io/repository/erasche/docker-django/status "Docker Repository on Quay")](https://quay.io/repository/erasche/docker-django)
Simple dockerfile for use in django projects.
Features:
- gunicorn
- lots of defaults provided for you
- startup script that waits on postgres being available
- script to automatically, randomly set the "admin" user password, and make it
visible to the console logs
- Ability to control number of workers and log level## How to use this
Copy and paste the following into your project and tweak to your needs.
```Dockerfile
# https://github.com/TAMU-CPT/docker-recipes/blob/master/django/Dockerfile.inherit
FROM quay.io/tamu_cpt/django# Add our project to the /app/ folder
ADD . /app/
# Install dependencies
RUN pip install -r /app/requirements.txt
# Set current working directory to /app
WORKDIR /app/# Fix permissions on folder while still root, and collect static files for use
# if need be.
RUN chown -R django /app && \
python manage.py collectstatic --noinput# Drop permissions
USER django
```