Commit 3cf16d7c authored by Zac Wood's avatar Zac Wood

gunicorn for prod

parent 9793c71f
FROM python:3.7
ENV PYTHONUNBUFFERED 1
RUN apt-get update
RUN apt-get install netcat python3-dev default-libmysqlclient-dev -y
RUN mkdir /go
WORKDIR /go
ADD /requirements/ /go/
RUN pip install -r prod.txt
ADD . /go/
RUN mkdir /static
......@@ -2,4 +2,4 @@
# production that isn't in development.
-r base.txt
gunicorn==19.6.0
gunicorn
......@@ -4,4 +4,5 @@ python go/manage.py makemigrations go
python go/manage.py migrate
python go/manage.py createsuperuser --noinput --username=$superuser --email=$superuser$GO_EMAIL_DOMAIN
echo "from django.contrib.auth import get_user_model; User = get_user_model(); me = User.objects.get(username='$superuser'); me.first_name = 'David'; me.last_name = 'Haynes'; me.save(); " | python go/manage.py shell
python go/manage.py runserver 0.0.0.0:8000
python go/manage.py collectstatic --noinput
gunicorn -b ":8000" --chdir /go/go settings.wsgi
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment