Commit 28d06130 authored by Aatish Neupane's avatar Aatish Neupane

add Dockerfile spec

parent 7a992a44
.git
*.pyc
db.sqlite3
venv/
\ No newline at end of file
FROM python:3-alpine3.6
ENV PYTHONUNBUFFERED=1
RUN apk add --no-cache linux-headers bash gcc \
musl-dev libjpeg-turbo-dev libpng libpq \
postgresql-dev uwsgi uwsgi-python3 git \
zlib-dev libmagic libffi-dev libressl-dev python3-dev
WORKDIR /site
ADD requirements.txt /site/
RUN pip install -U -r /site/requirements.txt
COPY ./ /site
CMD bash -c 'python3 manage.py migrate --noinput && python3 manage.py collectstatic --noinput && uwsgi --ini=/site/uwsgi.ini'
\ No newline at end of file
docker build -t ipv6dotwork .
docker run -d -p 8000:8000 --name ipv6dotwork ipv6dotwork
...@@ -140,7 +140,13 @@ USE_TZ = True ...@@ -140,7 +140,13 @@ USE_TZ = True
# Static files (CSS, JavaScript, Images) # Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/2.1/howto/static-files/ # https://docs.djangoproject.com/en/2.1/howto/static-files/
STATIC_URL = '/static/' STATIC_URL = '/static/'
STATICFILES_DIRS = (os.path.join(BASE_DIR, 'static/'), )
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles/')
MEDIA_ROOT = os.path.join(BASE_DIR, 'mediafiles/')
MEDIA_URL = '/media/'
CRISPY_TEMPLATE_PACK = 'bootstrap4' CRISPY_TEMPLATE_PACK = 'bootstrap4'
[uwsgi]
module=ipv6work.wsgi:application
pythonpath=/usr/local/lib/python3.6/site-packages
static-map = /static=/site/staticfiles/
static-map = /media=/site/mediafiles/
http-socket=0.0.0.0:8000
processes=3
plugin=python3
\ No newline at end of file
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