Дообавил отдельные Dockerfiles для django и приложения, удалил неиспользуемую статику, добавил expomap.ru в ALLOWED_HOSTS, добавил конфиг для sentry

stage8
Aleksey Chirko 8 years ago
parent 420a87e0a7
commit 02ec71ec28
  1. 40
      Dockerfile
  2. 36
      Dockerfile.django
  3. 57
      docker-compose.yml
  4. 11
      proj/settings.py
  5. BIN
      static/client/img/partners/new/РАЭК.jpg
  6. BIN
      static/img/gallery/.tmb/l1_MS5qcGc1344290228.png
  7. BIN
      static/img/gallery/.tmb/l1_MTAuanBn1344290212.png
  8. BIN
      static/img/gallery/.tmb/l1_MTEuanBn1344290212.png
  9. BIN
      static/img/gallery/.tmb/l1_MTIuanBn1344290216.png
  10. BIN
      static/img/gallery/.tmb/l1_MTMuanBn1344290218.png
  11. BIN
      static/img/gallery/.tmb/l1_MTQuanBn1344290218.png
  12. BIN
      static/img/gallery/.tmb/l1_MTUuanBn1344290220.png
  13. BIN
      static/img/gallery/.tmb/l1_MTYuanBn1344290222.png
  14. BIN
      static/img/gallery/.tmb/l1_MTcuanBn1344290224.png
  15. BIN
      static/img/gallery/.tmb/l1_MTguanBn1344290226.png
  16. BIN
      static/img/gallery/.tmb/l1_MTkuanBn1344290228.png
  17. BIN
      static/img/gallery/.tmb/l1_Mi5qcGc1344290242.png
  18. BIN
      static/img/gallery/.tmb/l1_MjAuanBn1344290232.png
  19. BIN
      static/img/gallery/.tmb/l1_MjEuanBn1344290232.png
  20. BIN
      static/img/gallery/.tmb/l1_MjIuanBn1344290236.png
  21. BIN
      static/img/gallery/.tmb/l1_MjMuanBn1344290238.png
  22. BIN
      static/img/gallery/.tmb/l1_MjQuanBn1344290240.png
  23. BIN
      static/img/gallery/.tmb/l1_My5qcGc1344290244.png
  24. BIN
      static/img/gallery/.tmb/l1_NC5qcGc1344290246.png
  25. BIN
      static/img/gallery/.tmb/l1_NS5qcGc1344290246.png
  26. BIN
      static/img/gallery/.tmb/l1_Ni5qcGc1344290248.png
  27. BIN
      static/img/gallery/.tmb/l1_Ny5qcGc1344290252.png
  28. BIN
      static/img/gallery/.tmb/l1_OC5qcGc1344290254.png
  29. BIN
      static/img/gallery/.tmb/l1_OS5qcGc1344290254.png
  30. 4
      static/js/datetimepicker/.travis.yml

@ -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

@ -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

@ -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"

@ -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',
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

@ -1,4 +0,0 @@
before_script:
- cd ./tests
- echo "new Date().toString();" | phantomjs
script: phantomjs run-qunit.js tests.html
Loading…
Cancel
Save