diff --git a/Dockerfile b/Dockerfile index 8ae1d826..e9f24a9d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,42 +1,12 @@ -FROM python:2.7.13 +FROM expomap/django ENV PYTHONUNBUFFERED 1 ENV LANG ru_RU.UTF-8 RUN mkdir /code WORKDIR /code -ADD . /code/ -RUN curl -sL https://deb.nodesource.com/setup_6.x | bash - -RUN apt-get update \ - \ - && DEBIAN_FRONTEND=noninteractive apt-get install -y \ - \ - build-essential \ - libtiff5-dev \ - libjpeg62-turbo-dev \ - zlib1g-dev \ - libfreetype6-dev \ - liblcms2-dev \ - libwebp-dev \ - tcl8.5-dev \ - tk8.5-dev \ - python-tk \ - pngquant \ - gifsicle \ - libmemcached-dev \ - locales \ - nodejs \ - \ - && rm -rf /var/lib/apt/lists/* \ - \ - && npm install -g gulp \ - \ - && npm install -RUN sed -i -e 's/# ru_RU.UTF-8 UTF-8/ru_RU.UTF-8 UTF-8/' /etc/locale.gen && \ - echo 'LANG="ru_RU.UTF-8"'>/etc/default/locale && \ - dpkg-reconfigure --frontend=noninteractive locales && \ - update-locale LANG=ru_RU.UTF-8 - -RUN pip install -r requirements.txt -# docker rmi $(docker images -q -f dangling=true) +ADD manage.py /code/ +ADD templates /code/templates +ADD proj /code/proj +ADD apps /code/apps \ No newline at end of file diff --git a/Dockerfile.django b/Dockerfile.django new file mode 100644 index 00000000..eac80b44 --- /dev/null +++ b/Dockerfile.django @@ -0,0 +1,36 @@ +FROM python:2.7.13 + +ENV PYTHONUNBUFFERED 1 +ENV LANG ru_RU.UTF-8 + +ADD ./requirements.txt / + +RUN curl -sL https://deb.nodesource.com/setup_6.x | bash - \ + && apt-get update \ + \ + && DEBIAN_FRONTEND=noninteractive apt-get install -y \ + \ + build-essential \ + libtiff5-dev \ + libjpeg62-turbo-dev \ + zlib1g-dev \ + libfreetype6-dev \ + liblcms2-dev \ + libwebp-dev \ + tcl8.5-dev \ + tk8.5-dev \ + python-tk \ + pngquant \ + gifsicle \ + libmemcached-dev \ + locales \ + uwsgi \ + \ + && rm -rf /var/lib/apt/lists/* \ + \ + && sed -i -e 's/# ru_RU.UTF-8 UTF-8/ru_RU.UTF-8 UTF-8/' /etc/locale.gen \ + && echo 'LANG="ru_RU.UTF-8"'>/etc/default/locale \ + && dpkg-reconfigure --frontend=noninteractive locales \ + && update-locale LANG=ru_RU.UTF-8 \ + && pip install -r requirements.txt + diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index 85411e7a..00000000 --- a/docker-compose.yml +++ /dev/null @@ -1,57 +0,0 @@ -version: '2' - -services: - web: - restart: always - container_name: exmap-web - build: . - command: /bin/bash -c "python manage.py runserver 0.0.0.0:8000" - volumes: - - .:/code - ports: - - "8000:8000" - links: - - mysql:exmap-mysql - - redis:exmap-redis - - solr:exmap-solr - environment: - - DEBUG=True - - LOCAL_DEV=True - - REDIS_HOST=redis - - REDIS_PORT=6379 - - MYSQL_HOST=mysql - - MYSQL_USER=root - - MYSQL_PASSWORD=root - - MYSQL_DATABASE=expomap - - ELASTICSEARCH_HOST=elastic - - EMAIL_BACKEND=django.core.mail.backends.console.EmailBackend - - SEARCH_ENGINE=haystack.backends.solr_backend.SolrEngine - - SEARCH_URI=http://solr:8983/solr - - SEARCH_INDEX_NAME=haystack - - mysql: - restart: always - image: mysql:5.5.57 - container_name: exmap-mysql - environment: - - MYSQL_ROOT_PASSWORD=root - - MYSQL_DATABASE=expomap - ports: - - "3305:3306" - volumes: - - ./data/mysql/db:/var/lib/mysql - - redis: - restart: always - image: redis:3.2.10 - container_name: exmap-redis - volumes: - - ./data/redis:/var/lib/redis - - solr: - build: - context: . - dockerfile: Dockerfile.solr - container_name: exmap-solr - ports: - - "8983:8983" diff --git a/proj/settings.py b/proj/settings.py index 662938e2..8310f155 100644 --- a/proj/settings.py +++ b/proj/settings.py @@ -55,7 +55,7 @@ SESSION_ENGINE = 'django.contrib.sessions.backends.cache' # Hosts/domain names that are valid for this site; required if DEBUG is False # See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts -ALLOWED_HOSTS = ['expomap.ru'] +ALLOWED_HOSTS = ['*'] DEFAULT_HTTP_SCHEME = 'https' # Local time zone for this installation. Choices can be found here: @@ -403,6 +403,7 @@ INSTALLED_APPS = ( 'rosetta', 'widget_tweaks', 'captcha', + 'raven.contrib.django.raven_compat', ) CRONJOBS = [ @@ -552,3 +553,11 @@ if DEBUG: 'django.template.loaders.app_directories.Loader', ) THUMBNAIL_DEBUG = True + +if os.environ.get('DEBUG') == 'False': + INSTALLED_APPS += ( + 'raven.contrib.django.raven_compat', + ) + RAVEN_CONFIG = { + 'dsn': 'http://474617c96350412d80735900c6717b9a:330285c9034947a181cbae8b52bb15d8@88.198.17.35:9000/3', + } diff --git a/static/client/img/partners/new/РАЭК.jpg b/static/client/img/partners/new/РАЭК.jpg deleted file mode 100644 index 39f1c157..00000000 Binary files a/static/client/img/partners/new/РАЭК.jpg and /dev/null differ diff --git a/static/img/gallery/.tmb/l1_MS5qcGc1344290228.png b/static/img/gallery/.tmb/l1_MS5qcGc1344290228.png deleted file mode 100644 index 98990f46..00000000 Binary files a/static/img/gallery/.tmb/l1_MS5qcGc1344290228.png and /dev/null differ diff --git a/static/img/gallery/.tmb/l1_MTAuanBn1344290212.png b/static/img/gallery/.tmb/l1_MTAuanBn1344290212.png deleted file mode 100644 index acbc9f76..00000000 Binary files a/static/img/gallery/.tmb/l1_MTAuanBn1344290212.png and /dev/null differ diff --git a/static/img/gallery/.tmb/l1_MTEuanBn1344290212.png b/static/img/gallery/.tmb/l1_MTEuanBn1344290212.png deleted file mode 100644 index f48e5ef1..00000000 Binary files a/static/img/gallery/.tmb/l1_MTEuanBn1344290212.png and /dev/null differ diff --git a/static/img/gallery/.tmb/l1_MTIuanBn1344290216.png b/static/img/gallery/.tmb/l1_MTIuanBn1344290216.png deleted file mode 100644 index de579fb0..00000000 Binary files a/static/img/gallery/.tmb/l1_MTIuanBn1344290216.png and /dev/null differ diff --git a/static/img/gallery/.tmb/l1_MTMuanBn1344290218.png b/static/img/gallery/.tmb/l1_MTMuanBn1344290218.png deleted file mode 100644 index ea733baa..00000000 Binary files a/static/img/gallery/.tmb/l1_MTMuanBn1344290218.png and /dev/null differ diff --git a/static/img/gallery/.tmb/l1_MTQuanBn1344290218.png b/static/img/gallery/.tmb/l1_MTQuanBn1344290218.png deleted file mode 100644 index d5a8047f..00000000 Binary files a/static/img/gallery/.tmb/l1_MTQuanBn1344290218.png and /dev/null differ diff --git a/static/img/gallery/.tmb/l1_MTUuanBn1344290220.png b/static/img/gallery/.tmb/l1_MTUuanBn1344290220.png deleted file mode 100644 index 9270866d..00000000 Binary files a/static/img/gallery/.tmb/l1_MTUuanBn1344290220.png and /dev/null differ diff --git a/static/img/gallery/.tmb/l1_MTYuanBn1344290222.png b/static/img/gallery/.tmb/l1_MTYuanBn1344290222.png deleted file mode 100644 index 6c0b8ee0..00000000 Binary files a/static/img/gallery/.tmb/l1_MTYuanBn1344290222.png and /dev/null differ diff --git a/static/img/gallery/.tmb/l1_MTcuanBn1344290224.png b/static/img/gallery/.tmb/l1_MTcuanBn1344290224.png deleted file mode 100644 index a0263cc3..00000000 Binary files a/static/img/gallery/.tmb/l1_MTcuanBn1344290224.png and /dev/null differ diff --git a/static/img/gallery/.tmb/l1_MTguanBn1344290226.png b/static/img/gallery/.tmb/l1_MTguanBn1344290226.png deleted file mode 100644 index 53d0d9d4..00000000 Binary files a/static/img/gallery/.tmb/l1_MTguanBn1344290226.png and /dev/null differ diff --git a/static/img/gallery/.tmb/l1_MTkuanBn1344290228.png b/static/img/gallery/.tmb/l1_MTkuanBn1344290228.png deleted file mode 100644 index c32a13b4..00000000 Binary files a/static/img/gallery/.tmb/l1_MTkuanBn1344290228.png and /dev/null differ diff --git a/static/img/gallery/.tmb/l1_Mi5qcGc1344290242.png b/static/img/gallery/.tmb/l1_Mi5qcGc1344290242.png deleted file mode 100644 index abd81662..00000000 Binary files a/static/img/gallery/.tmb/l1_Mi5qcGc1344290242.png and /dev/null differ diff --git a/static/img/gallery/.tmb/l1_MjAuanBn1344290232.png b/static/img/gallery/.tmb/l1_MjAuanBn1344290232.png deleted file mode 100644 index ce0bfab6..00000000 Binary files a/static/img/gallery/.tmb/l1_MjAuanBn1344290232.png and /dev/null differ diff --git a/static/img/gallery/.tmb/l1_MjEuanBn1344290232.png b/static/img/gallery/.tmb/l1_MjEuanBn1344290232.png deleted file mode 100644 index 744af612..00000000 Binary files a/static/img/gallery/.tmb/l1_MjEuanBn1344290232.png and /dev/null differ diff --git a/static/img/gallery/.tmb/l1_MjIuanBn1344290236.png b/static/img/gallery/.tmb/l1_MjIuanBn1344290236.png deleted file mode 100644 index e1aaa007..00000000 Binary files a/static/img/gallery/.tmb/l1_MjIuanBn1344290236.png and /dev/null differ diff --git a/static/img/gallery/.tmb/l1_MjMuanBn1344290238.png b/static/img/gallery/.tmb/l1_MjMuanBn1344290238.png deleted file mode 100644 index 22ba4301..00000000 Binary files a/static/img/gallery/.tmb/l1_MjMuanBn1344290238.png and /dev/null differ diff --git a/static/img/gallery/.tmb/l1_MjQuanBn1344290240.png b/static/img/gallery/.tmb/l1_MjQuanBn1344290240.png deleted file mode 100644 index 29119161..00000000 Binary files a/static/img/gallery/.tmb/l1_MjQuanBn1344290240.png and /dev/null differ diff --git a/static/img/gallery/.tmb/l1_My5qcGc1344290244.png b/static/img/gallery/.tmb/l1_My5qcGc1344290244.png deleted file mode 100644 index 3043149e..00000000 Binary files a/static/img/gallery/.tmb/l1_My5qcGc1344290244.png and /dev/null differ diff --git a/static/img/gallery/.tmb/l1_NC5qcGc1344290246.png b/static/img/gallery/.tmb/l1_NC5qcGc1344290246.png deleted file mode 100644 index a6f0418b..00000000 Binary files a/static/img/gallery/.tmb/l1_NC5qcGc1344290246.png and /dev/null differ diff --git a/static/img/gallery/.tmb/l1_NS5qcGc1344290246.png b/static/img/gallery/.tmb/l1_NS5qcGc1344290246.png deleted file mode 100644 index 877da51e..00000000 Binary files a/static/img/gallery/.tmb/l1_NS5qcGc1344290246.png and /dev/null differ diff --git a/static/img/gallery/.tmb/l1_Ni5qcGc1344290248.png b/static/img/gallery/.tmb/l1_Ni5qcGc1344290248.png deleted file mode 100644 index f90eb871..00000000 Binary files a/static/img/gallery/.tmb/l1_Ni5qcGc1344290248.png and /dev/null differ diff --git a/static/img/gallery/.tmb/l1_Ny5qcGc1344290252.png b/static/img/gallery/.tmb/l1_Ny5qcGc1344290252.png deleted file mode 100644 index 4944d594..00000000 Binary files a/static/img/gallery/.tmb/l1_Ny5qcGc1344290252.png and /dev/null differ diff --git a/static/img/gallery/.tmb/l1_OC5qcGc1344290254.png b/static/img/gallery/.tmb/l1_OC5qcGc1344290254.png deleted file mode 100644 index 2334ba86..00000000 Binary files a/static/img/gallery/.tmb/l1_OC5qcGc1344290254.png and /dev/null differ diff --git a/static/img/gallery/.tmb/l1_OS5qcGc1344290254.png b/static/img/gallery/.tmb/l1_OS5qcGc1344290254.png deleted file mode 100644 index 3690be1b..00000000 Binary files a/static/img/gallery/.tmb/l1_OS5qcGc1344290254.png and /dev/null differ diff --git a/static/js/datetimepicker/.travis.yml b/static/js/datetimepicker/.travis.yml deleted file mode 100644 index 7851a083..00000000 --- a/static/js/datetimepicker/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -before_script: - - cd ./tests - - echo "new Date().toString();" | phantomjs -script: phantomjs run-qunit.js tests.html