Дообавил отдельные Dockerfiles для django и приложения, удалил неиспользуемую статику, добавил expomap.ru в ALLOWED_HOSTS, добавил конфиг для sentry
@ -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" |
||||
|
Before Width: | Height: | Size: 7.2 KiB |
|
Before Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 5.2 KiB |
|
Before Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 5.9 KiB |
|
Before Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 5.9 KiB |
|
Before Width: | Height: | Size: 5.9 KiB |
|
Before Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 5.7 KiB |
|
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 |
||||