2017-04-29 10:17:41 +00:00
|
|
|
FROM python:3.6
|
|
|
|
|
2017-09-27 08:31:53 +00:00
|
|
|
|
|
|
|
RUN set -ex \
|
|
|
|
&& apt-get update
|
2017-04-29 10:17:41 +00:00
|
|
|
|
|
|
|
RUN set -ex \
|
|
|
|
&& buildDeps=' \
|
|
|
|
libmysqlclient-dev \
|
|
|
|
libffi-dev \
|
|
|
|
libfreetype6-dev \
|
|
|
|
libjpeg-dev \
|
|
|
|
libwebp-dev \
|
|
|
|
libpng-dev \
|
|
|
|
liblcms2-dev \
|
|
|
|
zlib1g-dev \
|
|
|
|
libmemcached-dev \
|
|
|
|
libsasl2-dev \
|
|
|
|
' \
|
2017-09-27 08:31:53 +00:00
|
|
|
|
2017-06-24 07:16:04 +00:00
|
|
|
&& apt-get install -y git xmlsec1 libmysqlclient18 \
|
2017-04-29 10:17:41 +00:00
|
|
|
&& apt-get install -y $buildDeps --no-install-recommends \
|
2017-09-27 08:31:53 +00:00
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
|
RUN set -ex \
|
|
|
|
&& pip install uwsgi
|
|
|
|
|
|
|
|
COPY constraints.txt requirements.txt /reqs/
|
|
|
|
|
|
|
|
RUN set -ex \
|
2017-04-29 10:17:41 +00:00
|
|
|
&& pip install --no-cache-dir -r /reqs/requirements.txt -c /reqs/constraints.txt \
|
|
|
|
&& apt-get purge -y --auto-remove $buildDeps \
|
|
|
|
&& rm -rf /usr/src/python ~/.cache
|
|
|
|
|
|
|
|
COPY . /app/symposion_app
|
|
|
|
|
|
|
|
WORKDIR /app/symposion_app
|
2017-06-26 11:11:15 +00:00
|
|
|
RUN set -x \
|
|
|
|
&& DJANGO_SECRET_KEY=1234 STRIPE_PUBLIC_KEY=1234 STRIPE_SECRET_KEY=1234 \
|
|
|
|
DATABASE_URL="sqlite:////dev/null" \
|
|
|
|
python manage.py collectstatic --noinput -l -v 0
|
2017-06-24 07:28:36 +00:00
|
|
|
CMD ["/usr/local/bin/uwsgi", "--http-socket", "0.0.0.0:8000", "--wsgi-file", "pinaxcon/wsgi.py"]
|