Files
HaitiData/deployment/docker/Dockerfile-cloud
T

69 lines
2.1 KiB
Plaintext

#--------- Generic stuff all our Dockerfiles should start with so we get caching ------------
# Note this base image is based on debian
FROM kartoza/django-base
MAINTAINER Muhammad Anis<anis@kartoza.com>
#RUN ln -s /bin/true /sbin/initctl
# Use local cached debs from host (saves your bandwidth!)
# Change ip below to that of your apt-cacher-ng host
# Or comment this line out if you do not with to use caching
# ADD 71-apt-cacher-ng /etc/apt/apt.conf.d/71-apt-cacher-ng
# Pandoc needed to generate rst dumps, uic compressor needed for django-pipeline
RUN apt-get update -y
# Set the locale - change to your preferred locale ... We use South African english
# We do this as cartridge (ecommerce platform for mezzanine) relies on
# the locale to set the correct number of decimal places for the MoneyField
RUN echo "deb http://ftp.debian.org/debian jessie main" >> /etc/apt/sources.list.d/gdal.list
RUN apt-get update
RUN apt-get install locales && \
echo "en_ZA.UTF-8 UTF-8" >> /etc/locale.gen && \
locale-gen en_ZA.UTF-8
RUN apt-get install libgdal-dev -y
ENV LANG en_ZA.UTF-8
ENV LANGUAGE en_ZA:en
ENV LC_ALL en_ZA.UTF-8
ENV CPLUS_INCLUDE_PATH /usr/include/gdal
ENV C_INCLUDE_PATH /usr/include/gdal
ADD REQUIREMENTS.txt /REQUIREMENTS.txt
RUN pip install -r /REQUIREMENTS.txt
RUN pip uninstall -y South
RUN pip install uwsgi
RUN pip uninstall geonode-dialogos -y
RUN pip install git+https://github.com/meomancer/geonode-dialogos.git
RUN pip uninstall geonode-agon-ratings -y
RUN pip install git+https://github.com/euclidian/custom-agon-ratings
RUN pip uninstall Django -y
RUN pip install Django==1.8.18
RUN pip uninstall django-oauth-toolkit -y
RUN pip install django-oauth-toolkit==0.12.0
RUN pip uninstall django-user-accounts -y
RUN pip install git+https://github.com/GeoNode/geonode-user-accounts@invite-user
RUN apt-get install gdal-bin
# Open port 8080 as we will be running our uwsgi socket on that
EXPOSE 8080
#USER www-data
WORKDIR /home/web
# Download repository
RUN git clone https://github.com/euclidian/haitidata
RUN make migrate
RUN make collectstatic
WORKDIR /home/web/django_project
CMD ["uwsgi", "--env", "LC_ALL=en_ZA.UTF-8", "--ini", "/uwsgi.conf"]